首页
This commit is contained in:
@@ -17,6 +17,7 @@ const getters = {
|
||||
topbarRouters:state => state.permission.topbarRouters,
|
||||
defaultRoutes:state => state.permission.defaultRoutes,
|
||||
sidebarRouters:state => state.permission.sidebarRouters,
|
||||
choicepart: state => state.app.choicepart,
|
||||
// 数据字典
|
||||
dict_datas: state => state.dict.dictDatas
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ const state = {
|
||||
},
|
||||
device: "desktop",
|
||||
size: localStorage.getItem("size") || "medium",
|
||||
choicepart: localStorage.getItem('choicepart') || null
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
@@ -38,6 +39,10 @@ const mutations = {
|
||||
SET_SIDEBAR_HIDE: (state, status) => {
|
||||
state.sidebar.hide = status;
|
||||
},
|
||||
SET_CHOICEPART: (state, choicepart) => {
|
||||
state.choicepart = choicepart
|
||||
localStorage.setItem('choicepart', choicepart)
|
||||
}
|
||||
};
|
||||
|
||||
const actions = {
|
||||
@@ -56,6 +61,9 @@ const actions = {
|
||||
toggleSideBarHide({ commit }, status) {
|
||||
commit("SET_SIDEBAR_HIDE", status);
|
||||
},
|
||||
setChoicepart({ commit }, choicepart) {
|
||||
commit('SET_CHOICEPART', choicepart)
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user