摘要: js 每5分钟刷新一次 通过el-switch 来控制是否启用自动更新 el-switch 通过 v-model 来绑定 store中的状态 computed: { autoRefresh: { get() { return this.$store.state.dmx.mvAutoRefresh } 阅读全文
posted @ 2021-04-08 18:55 大毛线|dmx 阅读(214) 评论(0) 推荐(0)
摘要: 如何在组件中使用 全局属性 mapState方式 import { mapState } from 'vuex' 将全局状态共享为当前组建的计算属性 computed: { ...mapState(['count']) } this.$store.state.count 的方式 mutation 用 阅读全文
posted @ 2021-04-08 18:43 大毛线|dmx 阅读(47) 评论(0) 推荐(0)