vue /vuex 在router的beforeach中调用vuex
有两种方法1、router.app.$store.dispatch('actionName')2、直接import store from './vuex/store/'import {actionName} from './vuex/actions/'然后 actionName(store)就可以了来源:https://segmentfault.com/q/1010000007476957...
·
有两种方法
1、router.app.$store.dispatch('actionName')
2、
直接
import store from './vuex/store/'
import {actionName} from './vuex/actions/'
然后
actionName(store)
就可以了
来源:https://segmentfault.com/q/1010000007476957
更多推荐
已为社区贡献42条内容
所有评论(0)