2021
07-02
07-02
Vuex数据持久化实现的思路与代码
什么是vuexvuex:是一个专为vue.js开发的状态管理器,采用集中式存储的所有组件状态五个属性:state、getters、mutations、actions、module基本使用:新建store.js文件,最后在main.js中引入,并挂载到实列上importVuefrom'vue'importVuexfrom'vuex'Vue.use(Vuex)conststate={}constgetters={}constmutations={}constactions={}exportdefaultnewVuex.Store({state,ge...
继续阅读 >