提交 a73bf768 编写于 作者: KK's avatar KK

zk——应用级数据状态同步(列表部件)

上级 c2df0653
......@@ -197,6 +197,15 @@
*/
public selections: Array<any> = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MainBase
*/
public appStateEvent: Subscription | undefined;
/**
* Vue声明周期,组件挂载完毕
*
......@@ -218,7 +227,6 @@
}
})
}
/**
* Vue声明周期,组件创建完毕
......@@ -245,6 +253,16 @@
}
});
}
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册