关于鸿蒙自定义弹框( CustomDialog )设置背景颜色不生效

48 阅读1分钟

单独设置backgroundColor时,自定义弹框背景颜色不会发生变化

需要同时设置: backgroundBlurStyle: BlurStyle.NONE才能生效

customDialog: CustomDialogController = new CustomDialogController({
  builder: DialogComponent({  // DialogComponent 自定义的弹框组件
  onXXX:()=>{},  // 自定义事件
  backgroundColor: "#17192D", 
  backgroundBlurStyle: BlurStyle.NONE
});