1.0.3 • Published 5 years ago
uni-vuex-sync v1.0.3
uni-vuex-sync
使用uniapp 开发时,解决vuex无法持久化的问题,小程序以及app段都不支持localStorage 在 store初始化及每次修改时 使用uni.storage保存同步
install
npm i uni-vuex-sync
test
import sync from 'uni-vuex-sync'
const store = new Vuex.Store({
modules: {
doctor_search,
kown_search,
user
},
// 启用严格模式
strict: true,
plugins: [sync],
mutations: {}
})