Vuex module模块

Vuex module的那些事(必须打开命名空间,namespaced: true,否则会抛异常)

// 触发module中的state
...mapState("", []) // 方式一
...mapState({
   xxx: state => state.xxx.xxx
})
// 触发module中的action
...mapAction("xxx", ['xxx'])
...mapAction({
   "xxx": "xxx/xxx"
})
posted @ 2022-06-26 13:01  HuangBingQuan  阅读(34)  评论(0编辑  收藏  举报