提交 2fd29a48 编写于 作者: Z zhaoxinyu

modify custom dialog sample codes

Signed-off-by: Nzhaoxinyu <zhaoxinyu20@huawei.com>
Change-Id: I8a3b5bd0c4aee2b211c059e0025a4d20c2424a44
上级 8cd35630
......@@ -108,6 +108,11 @@ struct CustomDialogUser {
customStyle: false
})
aboutToDisappear() {
delete this.dialogController,
this.dialogController = undefined
}
onCancel() {
console.info('Callback when the first button is clicked')
}
......@@ -124,7 +129,9 @@ struct CustomDialogUser {
Column() {
Button(this.inputValue)
.onClick(() => {
this.dialogController.open()
if (this.dialogController != undefined) {
this.dialogController.open()
}
}).backgroundColor(0x317aff)
}.width('100%').margin({ top: 5 })
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册