update
This commit is contained in:
@@ -5,7 +5,7 @@ Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
theme:'dark',
|
||||
theme:localStorage.getItem('theme') ? localStorage.getItem('theme') : '',
|
||||
userId:localStorage.getItem('userId') ? localStorage.getItem('userId') : '',
|
||||
userRole:localStorage.getItem('userRole') ? localStorage.getItem('userRole') : '',
|
||||
// 存储token
|
||||
@@ -14,9 +14,9 @@ export default new Vuex.Store({
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
SET_THEME:(state,data)=>{
|
||||
state.theme=data;
|
||||
window.sessionStorage.setItem('theme',data);
|
||||
setTheme:(state,data)=>{
|
||||
state.theme=data.theme;
|
||||
localStorage.setItem('theme',data.theme);
|
||||
},
|
||||
changeLogin (state, user) {
|
||||
state.Authorization = user.Authorization;
|
||||
|
Reference in New Issue
Block a user