chenjun

顶部遮罩没顶到topSafeHeight区,临时解决

... ... @@ -48,6 +48,7 @@ export struct VideoChannelPage {
async aboutToAppear() {
// 背景图高度
this.backgroundImageH = px2vp(this.topSafeHeight) + 44
console.info(`cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`)
this.setBarBackgroundColor()
}
... ... @@ -88,12 +89,12 @@ export struct VideoChannelPage {
* @returns
*/
tabSelectedColor(selected: boolean): string {
console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor}`)
console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor} selected = ${selected}`)
if (selected) {
return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222'
} else {
let ccolor = this.navItem.channelChooseCColor.replace('#', '#B3')
return this.navItem.channelChooseCColor ? ccolor : '#666666'
let ccolor = this.navItem.channelChooseCColor.replace('#', '#99')
return this.navItem.channelChooseCColor ? ccolor : '#99FFFFFF'
}
}
... ... @@ -105,6 +106,7 @@ export struct VideoChannelPage {
this.topNavView()
}
.backgroundColor(Color.Black)
.width('100%')
.height('100%')
}
... ... @@ -207,6 +209,7 @@ export struct VideoChannelPage {
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
// .backgroundColor(Color.Blue)
.linearGradient({
colors: [
['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0]
... ... @@ -269,6 +272,7 @@ export struct VideoChannelPage {
}
}, (item: TopNavDTO) => item.channelId + '')
}
.position({y:3})//顶部遮罩会空出一点,临时解决
.indicator(false)
.loop(false)
.width('100%')
... ...