【发布时间】:2019-09-12 13:08:12
【问题描述】:
我如何在 user.js 中调用突变,从 whoToFollow.js 调用 reset ?甚至可能吗?这是我的代码:
async logOut({commit}) {
this.$cookies.remove('token');
commit('set_token', null);
commit('whoToFollow/reset');
this.$router.push('/sign-in');
},
但它不起作用我收到此错误:
unknown local mutation type: whoToFollow/reset, global type: user/whoToFollow/reset
【问题讨论】: