enc-framework
Version:
enc-framework 核心组件.
35 lines (27 loc) • 690 B
JavaScript
// 引入对象持有者
import SessionContextHodler from '../utils/ajm-session'
// 系统
const system = {
namespaced: true,
// 状态信息
state: {
// 系统信息
systemInfo: SessionContextHodler.getContext().getSystemInfo()
},
// 操作方法
mutations: {
// 设置系统信息
saveSystemInfo: (state, systemInfo) => {
SessionContextHodler.getContext().setSystemInfo(systemInfo);
state.systemInfo = systemInfo;
}
},
//任意异步操作
actions: {
// 保存系统信息
saveSystemInfo({commit}, systemInfo){
commit('saveSystemInfo', systemInfo);
}
}
}
export default system