长话短说:就是使用了vuex-alone插件 详细:https://github.com/boenfu/vuex-along#readme
1.Install
npm install vuex-along --save
2.Use
1.import 导入
import vuexAlong from 'vuex-along'
...
2.add to store
添加至store的 plugins 的数组里
export default new Vuex.Store({
state:{...},
...
plugins: [vuexAlong]
});
Now the plug-in has come into effect / 现在插件已经生效了
Save all state by default / 默认保存所有state
You can set up by use API / 你可以通过相应API来设置
详细:https://github.com/boenfu/vuex-along#readme
本文介绍了一个简化 Vuex 状态管理的插件——Vuex-Alone 的安装及配置方法。通过此插件可以轻松实现状态的自动保存功能,极大提升了开发效率。
3296

被折叠的 条评论
为什么被折叠?



