提交 914ba4be 编写于 作者: LUCIFER-ZHU's avatar LUCIFER-ZHU

表单值变更 退出时确认框重复渲染 --fix5

上级 92a98526
...@@ -95,6 +95,9 @@ export class Notice { ...@@ -95,6 +95,9 @@ export class Notice {
*/ */
public async confirm(title: string, message: string, store?: Store<any>): Promise<boolean> { public async confirm(title: string, message: string, store?: Store<any>): Promise<boolean> {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
if (store && store.commit) {
store.commit('changeNoticeStatus',true);
}
const alert = await alertController.create({ const alert = await alertController.create({
header: title ? title : '标题', header: title ? title : '标题',
message: message, message: message,
...@@ -121,7 +124,7 @@ export class Notice { ...@@ -121,7 +124,7 @@ export class Notice {
}, },
], ],
}); });
if (store && store.state && store.state.hasClose) { if (store && store.state && store.state.noticeStatus) {
await alert.present(); await alert.present();
if (store && store.commit) { if (store && store.commit) {
store.commit('changeNoticeStatus',false); store.commit('changeNoticeStatus',false);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册