提交 e06847e8 编写于 作者: Mosher's avatar Mosher

update:更新

上级 f3c18a50
...@@ -130,3 +130,12 @@ export const getViewMessage = (state: any) => (tag: string) => { ...@@ -130,3 +130,12 @@ export const getViewMessage = (state: any) => (tag: string) => {
let id = state.viewMessage[tag]; let id = state.viewMessage[tag];
return id; return id;
} }
/**
* 获取全局数据
*
* @param state
*/
export const getAppGlobal = (state: any) => () => {
return state.appGlobal;
}
\ No newline at end of file
...@@ -304,3 +304,26 @@ export const addViewMessage = (state: any, args: { tag: string, id: any }) => { ...@@ -304,3 +304,26 @@ export const addViewMessage = (state: any, args: { tag: string, id: any }) => {
state.viewMessage[args.tag] = args.id; state.viewMessage[args.tag] = args.id;
} }
} }
/**
* 添加全局数据
*
* @param state
*/
export const addAppGlobal = (state: any, args: { tag: string, param: any }) => {
if (args && args.tag && args.param) {
state.appGlobal[args.tag] = args.param;
}
}
/**
* 删除指定键值全局数据
*
* @param state
* @param args
*/
export const removeAppGlobal = (state: any, tag: string) => {
if (tag && state.appGlobal[tag]) {
delete state.appGlobal[tag];
}
}
\ No newline at end of file
...@@ -17,4 +17,5 @@ export const rootstate: any = { ...@@ -17,4 +17,5 @@ export const rootstate: any = {
orgDataMap:{}, orgDataMap:{},
depDataMap:{}, depDataMap:{},
viewMessage: {}, viewMessage: {},
appGlobal:{},
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册