摘要: 由于 Vuex 的状态存储本来就是响应式的,从 store 实例中读取状态最简单的方法,就是在计算属性中返回某个状态。 在 B 页面引入以下代码: 此时,当 A 页面通过某种方式更改了 this.$store.state.someValue 的值,B 页面中 myValue 的值便会自动得到更新。 阅读全文
posted @ 2019-07-23 18:00 expworld 阅读(5699) 评论(0) 推荐(0) 编辑