mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-02 06:33:40 +08:00
34 lines
497 B
JavaScript
34 lines
497 B
JavaScript
export default {
|
|
state: {
|
|
info: {},
|
|
list: [],
|
|
modules: []
|
|
},
|
|
|
|
getters: {
|
|
// 组件信息
|
|
components: (state) => state.info,
|
|
// 组件列表
|
|
componentList: (state) => state.list,
|
|
// 组件模块
|
|
componentModules: (state) => state.modules
|
|
},
|
|
|
|
mutations: {
|
|
SET_COMPONENT(state, list) {
|
|
let d = {};
|
|
|
|
list.forEach((e) => {
|
|
d[e.name] = e;
|
|
});
|
|
|
|
state.list = list;
|
|
state.info = d;
|
|
},
|
|
|
|
SET_COMPONENT_MODULES(state, list) {
|
|
state.modules = list;
|
|
}
|
|
}
|
|
};
|