wangliang_wd

feat:优化视频详情页评论弹出

@@ -20,9 +20,16 @@ export struct CommentListDialogView { @@ -20,9 +20,16 @@ export struct CommentListDialogView {
20 onClose?: () => void 20 onClose?: () => void
21 onHeightDidChange?: Callback<number> 21 onHeightDidChange?: Callback<number>
22 22
  23 + @StorageProp('currentBreakpoint') currentBreakpoint: string = 'sm';
  24 + @State isPad:boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"?true:false
  25 +
23 aboutToAppear(): void { 26 aboutToAppear(): void {
  27 + if (this.isPad) {
  28 + this.maxHeight = this.windowHeight * 0.6
  29 + }else {
24 this.maxHeight = this.windowHeight - this.windowWidth * 9 / 16 30 this.maxHeight = this.windowHeight - this.windowWidth * 9 / 16
25 } 31 }
  32 + }
26 33
27 build() { 34 build() {
28 Row() { 35 Row() {