摘要:
做项目时候需要设定一个状态值为全局可以使用。所以使用vuex 在index.js当中state内设定属性。 state: { // 切换播放按钮 playPause: true }, mutations: { updataPlayPause: function (state) { state.pla 阅读全文
posted @ 2022-06-25 20:50
WangED
阅读(632)
评论(0)
推荐(0)
摘要:
原贴:https://blog.csdn.net/CSDN_go_die/article/details/121383317 方法一:比如现在state中有这样一个数据count,值为0: state: { count:0, }, 那么在组件中可以调用this.$store.state.xxxx来访 阅读全文
posted @ 2022-06-25 16:50
WangED
阅读(214)
评论(0)
推荐(0)

浙公网安备 33010602011771号