有两种方法

1、router.app.$store.dispatch('actionName')

2、

直接

import store from './vuex/store/'
import {actionName} from './vuex/actions/'

然后

 actionName(store)
 

就可以了

来源:https://segmentfault.com/q/1010000007476957

Logo

前往低代码交流专区

更多推荐