我的弹出框样式差别比较大,所以我需要写两个弹出框,但是自定义的弹出框要怎么引入两个呢?
以下是我引入了一个了
// 调用弹框
dialogController: CustomDialogController | null = new CustomDialogController({
builder: DeviceOpenDialog({
IsDeviceSuccess:$IsDeviceSuccess,
confirm: ()=> { }
}),
autoCancel: false,
alignment: DialogAlignment.Center,
gridCount: 8,
customStyle: false,
cornerRadius: 10,
})
// 在自定义组件即将析构销毁时将dialogControlle置空
aboutToDisappear() {
this.dialogController = null
}
// wifi设置
setWIFI () {
if (this.dialogController != null) {
this.dialogController.open()
}
}
请参考以下代码,支持文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-methods-custom-dialog-box-V5
或者