@eim-materials/eim-pc-admin-lite
Version:
该模板适用于从 0 到 1 开始搭建项目,内置基础的页面,路由和菜单展示。
26 lines (24 loc) • 534 B
JavaScript
/* eslint no-return-assign: 0 */
const app = {
state: {
sidebar: {
opened: true,
},
currentPath: '',
},
mutations: {
TOGGLE_SIDEBAR: state => state.sidebar.opened = !state.sidebar.opened,
SETCURRENTPATH: (state, currentPath) => {
state.currentPath = currentPath;
},
},
actions: {
ToggleSideBar: ({ commit }) => {
commit('TOGGLE_SIDEBAR');
},
SETCURRENTPATH: ({ commit }, currentPath) => {
commit('SETCURRENTPATH', currentPath);
},
},
};
export default app;