在HarmonyOS NEXT开发中组件绑定popup弹窗,如何将弹窗背景设置成透明状态?问题场景:
popupColor设置成透明但弹窗还是默认白色背景
Image($r("app.media.gray_tips_icon"))
.width($r("app.string.dp15"))
.height($r("app.string.dp15"))
.onClick(() => {
this.tipPopup = !this.tipPopup
})
.bindPopup(this.tipPopup, {
builder: this.popupBuilder(),
placement: Placement.Top,
mask: false,
popupColor: Color.Transparent,
enableArrow: true,
showInSubWindow: false,
onStateChange: (e) => {
if (!e.isVisible) {
this.tipPopup = false
}
},
arrowOffset: $r("app.string.dp50"),
offset: { x: $r("app.string.dp20") },
radius: $r("app.string.dp8")
})
参考代码: