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

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

上级 7d0bf855
......@@ -250,6 +250,6 @@ export const updateZIndex = (state: any, zIndex: number) => {
*
* @param state
*/
export const changeHasClose = (state: any, status: boolean) => {
state.hasClose = status;
export const changeNoticeStatus = (state: any, status: boolean) => {
state.noticeStatus = status;
}
\ No newline at end of file
......@@ -13,5 +13,5 @@ export const rootstate: any = {
thirdPartyName:'',
localdata: {},
zIndex: 300,
hasClose:true,
noticeStatus:true,
}
\ No newline at end of file
......@@ -101,9 +101,10 @@ export class Notice {
buttons: [
{
text: '取消',
role: 'cancel',
handler: () => {
if (store && store.commit) {
store.commit('changeHasClose',true);
store.commit('changeNoticeStatus',true);
}
resolve(false);
}
......@@ -113,7 +114,7 @@ export class Notice {
cssClass: 'secondary',
handler: () => {
if (store && store.commit) {
store.commit('changeHasClose',true);
store.commit('changeNoticeStatus',true);
}
resolve(true);
}
......@@ -122,12 +123,12 @@ export class Notice {
});
if (store && store.state && store.state.hasClose) {
await alert.present();
}
if (store && store.commit) {
store.commit('changeHasClose',false);
if (store && store.commit) {
store.commit('changeNoticeStatus',false);
}
}
});
}
}
/**
* 创建对象
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册