HarmonyOS POP颜色设置了没有效果?

.bindPopup(this.isShowPopu, {
  builder: this.customPop(),
  radius: 2,
  placement: Placement.Bottom,
  arrowOffset: 60,
  popupColor: $r('app.color.color_232934'),
  autoCancel: true,
  onStateChange: (e) => {
    if (!e.isVisible) {
      this.isShowPopu = false
    }
  },
})

/**充电订单 充电帮助的pop*/
@Builder customPop() {
  Column() {
    Text('充电订单').fontSize(16).fontColor(Color.White).padding(16).border({width: {bottom: '1px'}, color: Color.White})
      .onClick(()=>{
        JumpUtil.execJump({url: JumpUtil.getH5Url(H5HostType.APPHOST, Order.CHARGEORDER_LIST)})
        this.isShowPopu = false
      })
    Text('充电帮助').fontSize(16).fontColor(Color.White).padding(16)
      .onClick(()=>{
        JumpUtil.execJump({url: VehicleService.CHARGE_HELP.path.replace('%s', 'take')})
        this.isShowPopu = false
      })
  }.backgroundColor(Color.Transparent)
}
阅读 573
1 个回答

想去除模糊背景填充效果,需将backgroundBlurStyle设置为BlurStyle.NONE。模拟器和真机均可正常显示。

.bindPopup(this.customPopup, {
  builder: this.customPop(), // 气泡的内容
  popupColor: Color.Red, // 气泡的背景色
  backgroundBlurStyle: BlurStyle.NONE,
  radius: 2,
  placement: Placement.Bottom,
  arrowOffset: 60,
  onStateChange: (e) => {
    if (!e.isVisible) {
      this.isShowPopu = false
    }
  }
})
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进