摘要: 首先配置store/index.js main.js引用 在需要监听状态改变的页面使用computed 和 watch实现监听 要点: 1.一定要配置store/index.js 里面的getters,空的也行 2.改变state值建议用this.$store.commit('valIsChange 阅读全文
posted @ 2018-12-28 22:47 佑之以航 阅读(1786) 评论(0) 推荐(0) 编辑