123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import Vue from 'vue';
- import Vuex from 'vuex';
- import systemModule from './modules/system';
- import usersModule from './modules/users';
- Vue.use(Vuex);
- export default new Vuex.Store({
- state: {
- userInfo: {},
- menus: [
- { id: '01', name: '工作台', url: '/dashboard' },
- {
- id: '02',
- name: '系统管理',
- url: '',
- icon: '',
- children: [
- {
- id: '0201',
- name: '用户管理',
- url: '/user',
- },
- {
- id: '0202',
- name: '角色管理',
- url: '/role',
- },
- {
- id: '0203',
- name: '菜单管理',
- url: '/menu',
- },
- ],
- },
- ],
- },
- getters: {},
- mutations: {
- setUserInfo(state, user) {
- state.userInfo = user;
- },
- },
- actions: {},
- modules: {
- system: systemModule,
- users: usersModule,
- },
- plugins: [],
- });
|