使用 vuex-persistedstate 数据持久化插件 没有在localStorage中没有生成相应的vuex的键和值
import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
buildingsUrl: "",
floorRemark: '',
floorDetail: {},
facilityList: {},
floorPOSition: false,
introduceOfBook: {},
visitUuid: localStorage.getItem('visitUuid') || ``,
encode: localStorage.getItem('encode') || ``,
identity: '',
showList: {},
layerData: {},
UserUuid: '',
findbook: {},
hasLogin: false,
ebook: '',
newook: '',
searchWord: '',
schoolUuid: ''
},
plugins: [createPersistedState()]
})
不知道该怎么办了无语中
没看出啥问题 有报错信息吗
这篇文章:vuex-persistedstate 也许有你想要的答案,你可以看看