CustomDialogController使用后置空

Signed-off-by: 赵鹏 <2645604041@qq.com>
This commit is contained in:
赵鹏 2023-12-20 15:25:54 +08:00
parent 544fd99d77
commit da094810d6
4 changed files with 16 additions and 0 deletions

View File

@ -418,6 +418,10 @@ struct applicationItem {
}
}
aboutToDisappear() {
this.privacyDialogController = null;
}
build() {
Column() {
Row() {

View File

@ -71,6 +71,10 @@ struct dialogPlusPage {
this.privacyDialogController.open();
}
aboutToDisappear() {
this.privacyDialogController = null;
}
onPageShow() {
this.isUpdate ++;
}

View File

@ -53,6 +53,10 @@ struct globalSwitch {
aboutToAppear() {
this.privacyDialogController.open();
}
aboutToDisappear() {
this.privacyDialogController = null;
}
}
@CustomDialog

View File

@ -51,6 +51,10 @@ struct SecurityDialog {
want = this.want;
win = this.win;
}
aboutToDisappear() {
this.securityDialogController = null;
}
}
@CustomDialog