这个问题是vuex中的问题
确实就是一种语法错误
vuex有规则
写在mutations中的函数为同步执行,只能用commit调用
写在actions中的函数为异步,只能通过dispatch调用
如果调用的方式错了就会出现这个错误
this.$store.commit('setCurrentColumn',"值");
this.$store.dispatch('setCurrentColumn',"值");
这个问题是vuex中的问题
确实就是一种语法错误
vuex有规则
写在mutations中的函数为同步执行,只能用commit调用
写在actions中的函数为异步,只能通过dispatch调用
如果调用的方式错了就会出现这个错误
this.$store.commit('setCurrentColumn',"值");
this.$store.dispatch('setCurrentColumn',"值");