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

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