This commit is contained in:
2023-11-14 10:35:10 +08:00
parent 045843bc1c
commit 26862423c1
28 changed files with 608 additions and 22 deletions

View File

@@ -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
}

View File

@@ -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 {