有两种方法

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

2、

直接

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

然后

 actionName(store)
 

就可以了

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2023-02-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案