diff --git a/features/videoDetail/src/main/ets/view/VideoDetail.ets b/features/videoDetail/src/main/ets/view/VideoDetail.ets index 54bac78d158e692f6eb9de31fee50abc3fe45da1..34589e6b376546ddf862bc549dd8f4bd90f481eb 100644 --- a/features/videoDetail/src/main/ets/view/VideoDetail.ets +++ b/features/videoDetail/src/main/ets/view/VideoDetail.ets @@ -233,7 +233,7 @@ export struct VideoDetail { .sideBarPosition(SideBarPosition.End) .sideBarWidth($r('app.float.side_bar_min_width')) .minSideBarWidth($r('app.float.side_bar_min_width')) - .maxSideBarWidth(px2vp(this.windowWidth * DetailConstants.COMMENTS_AREA_PERCENT)) + .maxSideBarWidth(this.getUIContext().px2vp(this.windowWidth * DetailConstants.COMMENTS_AREA_PERCENT)) // [End side_bar_container] } .height(CommonConstants.FULL_PERCENT)