diff --git a/src/store/index.js b/src/store/index.js index 6202026..ef842c6 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,10 +1,11 @@ -import { createStore } from 'vuex' +import {createStore} from 'vuex' import authentication from './authentication' import courseManagement from './courseManagement' import meetingManagement from './meetingManagement' import newsManagement from './newsManagement' import organizationManagement from './organizationManagement' import userManagement from './userManagement' +import createPersistedState from "vuex-persistedstate"; // 请不要直接修改本文件,使用修改/store目录下的对应模块名称的js的方式来代替-> @@ -16,7 +17,13 @@ const store = createStore({ newsManagement, organizationManagement, userManagement - } + }, + + plugins: [ + createPersistedState({ + storage: window.localStorage, + }), + ] }) export default store