List中Column设置background属性时延迟加载。导致展示时候闪一下
代码如下
@Builder
backgroundView() {
Column() {
Image($r(`app.media.${this.imageItem.top}`))
.width('100%')
.height(93)
.syncLoad(true)
Image($r(`app.media.${this.imageItem.center}`))
.width('100%')
.layoutWeight(1)
.syncLoad(true)
Image($r(`app.media.${this.imageItem.bottom}`))
.width('100%')
.height(60)
.syncLoad(true)
}
.backgroundColor(Color.White)
}
Column() {
……
}
.width('100%')
// .backgroundColor(Color.White)
.background(this.backgroundView(), { align: Alignment.Center })
.borderRadius(10)
.margin(10)
目前自定义背景渲染会有一定延迟,不能响应事件,不能进行动态更新。该属性不支持嵌套使用,不支持预览器预览。参考文档:https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-background.md