提交 f6396365 编写于 作者: zhujiamin's avatar zhujiamin

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

上级 a012b3ed
...@@ -11,7 +11,7 @@ export class Notice { ...@@ -11,7 +11,7 @@ export class Notice {
/** /**
* store * store
*/ */
public store:Store<any> = null; public store:any = null;
/** /**
* 唯一实例 * 唯一实例
...@@ -102,7 +102,9 @@ export class Notice { ...@@ -102,7 +102,9 @@ export class Notice {
{ {
text: '取消', text: '取消',
handler: () => { handler: () => {
store.commit('changeHasClose',true); if (store && store.commit) {
store.commit('changeHasClose',true);
}
resolve(false); resolve(false);
} }
}, },
...@@ -110,16 +112,20 @@ export class Notice { ...@@ -110,16 +112,20 @@ export class Notice {
text: '确认', text: '确认',
cssClass: 'secondary', cssClass: 'secondary',
handler: () => { handler: () => {
store.commit('changeHasClose',true); if (store && store.commit) {
store.commit('changeHasClose',true);
}
resolve(true); resolve(true);
} }
}, },
], ],
}); });
if (store.state.hasClose) { if (store && store.state && store.state.hasClose) {
await alert.present(); await alert.present();
} }
store.commit('changeHasClose',false); if (store && store.commit) {
store.commit('changeHasClose',false);
}
}); });
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册