Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-10-14 16:54:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c06798b5e6f7689cf7d63011dd13401392cfa42a
c06798b5
1 parent
83396a85
fix: 人民日报在平板上竖屏使用, 播放视频页面, 点击评论, 视频画面会变的非常小,原因是获取的主窗口宽高有问题
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentListDialog.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentListDialog.ets
View file @
c06798b
import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
import { Logger, PublicDialogManager } from 'wdKit/Index'
import { Logger, PublicDialogManager
, WindowModel
} from 'wdKit/Index'
import { TrackConstants } from 'wdTracking/Index'
import { OperRowListView } from '../../view/OperRowListView'
import { publishCommentModel } from '../model/PublishCommentModel'
...
...
@@ -10,8 +10,8 @@ const TAG = "CommentListDialogView"
/// 评论列表弹框
@Component
export struct CommentListDialogView {
@State windowWidth: number = AppStorage.get<number>('windowWidth') || 0
@State windowHeight: number = AppStorage.get<number>('windowHeight') || 0
@State windowWidth: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.width
@State windowHeight: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.height
@Link showCommentList: boolean
@Link contentDetailData: ContentDetailDTO // 详情页传
@Link pageInfo: PageInfoDTO // 专题页传
...
...
@@ -24,11 +24,12 @@ export struct CommentListDialogView {
@State isPad:boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"?true:false
aboutToAppear(): void {
if (this.isPad) {
this.maxHeight = this.windowHeight * 0.6
}else {
this.maxHeight = this.windowHeight - this.windowWidth * 9 / 16
}
// if (this.isPad) {
// this.maxHeight = this.windowHeight * 0.6
// }else {
// this.maxHeight = this.windowHeight - this.windowWidth * 9 / 16
// }
this.maxHeight = this.windowHeight - this.windowWidth * 9 / 16
}
build() {
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
c06798b
...
...
@@ -46,8 +46,10 @@ export struct DetailPlayShortVideoPage {
@Consume @Watch('videoStatusChange') switchVideoStatus: boolean
@State isPlay: boolean = true // 视频手动播放暂停
@Consume @Watch('pageShowChange') pageShow: number
@Consume windowWidth: number
@Consume windowHeight: number
// @Consume windowWidth: number
@State windowWidth: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.width
// @Consume windowHeight: number
@State windowHeight: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.height
@Consume topSafeHeight: number
@Consume showComment: boolean // 是否显示底部评论,首页视频频道传false
@State imageVisible: boolean = true
...
...
Please
register
or
login
to post a comment