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

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

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