vuex刷新丢失问题,持久化
程序员文章站
2022-07-13 22:46:22
...
参考:网址
store/index.js
import Vue from 'vue'
import Vuex from 'vuex'
import user from './module/user'
import app from './module/app'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
info:[],
},
mutations: {
},
actions: {
},
modules: {
user,
app,
},
plugins:[createPersistedState()]
})
上一篇: ehcache持久化重启不丢失