HarmonyOS bindPopup设置color无效

.bindPopup(this.showTip, { 
  // PopupOptions类型气泡的内容 
  message: this.navBarProp.tips, 
  popupColor: "#E6000000", 
  messageOptions: { 
    // 气泡的文本样式 
    textColor: "#FFFFFFFF", 
    font: { 
      size: 14, 
      style: FontStyle.Normal, 
      weight: FontWeight.Regular 
    } 
  }, 
  placement: Placement.Bottom, 
  enableArrow: true, 
  targetSpace: '-4vp', 
  onStateChange: (e) => { 
    console.info(JSON.stringify(e.isVisible)) 
    if (!e.isVisible) { 
      this.showTip = false 
    } 
  }, 
}) 
popupColor: "#E6000000"
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.

设置popup背景色无效。

这行代码设置不生效。

HarmonyOS
2024-09-02 11:04:18
847浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
put_get

更改气泡颜色除了设置属性popupColor之外,还需再补充设置一个backgroundBlurStyle属性,默认值:BlurStyle.COMPONENT_ULTRA_THICK是有一个模糊层,将其改成BlurStyle.NONE,就能实现气泡更改颜色的效果。具体内容请看:

https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-universal-attributes-popup-V5#popupoptions类型说明

分享
微博
QQ
微信
回复
2024-09-02 16:12:03


相关问题
HarmonyOS bindPopup如何设置箭头颜色
917浏览 • 1回复 待解决
HarmonyOS designWidth设置无效
573浏览 • 1回复 待解决
HarmonyOS 设置margin无效
621浏览 • 1回复 待解决
HarmonyOS 设置 bodercolor 无效
793浏览 • 1回复 待解决
HarmonyOS camera设置对焦无效
1216浏览 • 1回复 待解决
HarmonyOS 组件设置属性无效
1141浏览 • 1回复 待解决
HarmonyOS Progress设置渐变无效
528浏览 • 1回复 待解决
HarmonyOS 用域名设置cookie无效
875浏览 • 1回复 待解决
HarmonyOS bindPopup的使用
849浏览 • 1回复 待解决
HarmonyOS 组件.bindPopup属性使用问题
1068浏览 • 1回复 待解决
HarmonyOS color.json
1008浏览 • 1回复 待解决
HarmonyOS 相机打开闪光灯设置无效
2065浏览 • 1回复 待解决