import { mapState, mapActions, mapGetters } from "vuex";
// vuex actions
...mapActions([
'TenantConfigTable' // -> this.TenantConfigTable()
]),
...mapActions([
"moduleA/TenantConfigTable" // -> this['moduleA/TenantConfigTable']()
]),
...mapActions("moduleA", [
"TenantConfigTable" // -> this.TenantConfigTable()
]),
...mapActions({
newFn: "TenantConfigTable" // 将`this.newFn()`映射为`this.$store.dispatch('sampleFn')`
}),
vuex调用modules里面的actions、mapActions
最新推荐文章于 2024-03-15 15:01:35 发布