zhangbo1_wd

精选评论页面沉浸式调整

... ... @@ -37,21 +37,21 @@ export struct QualityCommentsComponent {
aboutToDisappear(): void {
// windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
this.dialogController = null // 将dialogController置空
WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setWindowLayoutFullScreen(false)
}
onPageShow(): void {
WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setWindowLayoutFullScreen(true)
}
onPageHide(): void {
WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setWindowLayoutFullScreen(false)
}
aboutToAppear(): void {
this.getData();
this.showAlert()
WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setWindowLayoutFullScreen(true)
}
showAlert() {
... ... @@ -106,6 +106,7 @@ export struct QualityCommentsComponent {
Image($r('app.media.comment_img_banner')).width('100%')
.height(283)
// .aspectRatio(375 / 283);
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) {
... ... @@ -156,13 +157,15 @@ export struct QualityCommentsComponent {
/*导航栏*/
@Builder
TabbarNormal() {
Column() {
Stack({ alignContent: Alignment.Top }) {
Row() {
}
.width('100%')
.height(px2vp(this.topSafeHeight))
.backgroundColor($r('app.color.white'))
.opacity(this.tileOpacity)
.visibility(this.tileOpacity > 0 ? 0 : 1)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Stack({ alignContent: Alignment.Start }) {
Row() {
... ... @@ -218,6 +221,7 @@ export struct QualityCommentsComponent {
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.clip(false)
// this.TabbarTransparent()
this.TabbarNormal()
}
... ... @@ -253,7 +257,7 @@ export struct QualityCommentsComponent {
this.currentPage++
this.getData()
})
.margin({ top: 196 })
.margin({ top: 196 - px2vp(this.topSafeHeight) })
.height("100%")
.width("100%")
.edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
... ...
... ... @@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone
@Component
struct QualityCommentsPage {
onPageShow(): void {
WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setWindowLayoutFullScreen(true)
}
onPageHide(): void {
WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setWindowLayoutFullScreen(false)
}
build() {
... ...