长话短说:就是使用了vuex-alone插件 详细:https://github.com/boenfu/vuex-along#readme
npm install vuex-along --save
import vuexAlong from 'vuex-along'
...
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