在鸿蒙开发中popup的背景无法做到真正的透明 ?

在鸿蒙开发中popup的背景无法做到真正的透明 ?已经设置了 backgroundBlurStyle: BlurStyle.NONE, popupColor: Color.Transparent

本文参与了 【 HarmonyOS NEXT 技术问答冲榜,等你来战!】欢迎正在阅读的你也加入。

阅读 532
1 个回答

你可以试一下这样写:

.bindPopup(this.customPopup, { 
  message: '抖音', // 气泡的内容 
  placement:Placement.Bottom, // 气泡的弹出位置 
  maskColor: Color.Transparent, 
  popupColor:Color.Transparent, // 气泡的背景色 
  backgroundBlurStyle: BlurStyle.NONE, 
  shadow: { 
    radius:0 
  }, 
  onStateChange: (e) => { 
    console.info(JSON.stringify(e.isVisible)) 
    if (!e.isVisible) { 
      this.customPopup = false 
    } 
  } 
})

本文参与了 【 HarmonyOS NEXT 技术问答冲榜,等你来战!】欢迎正在阅读的你也加入。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进