import { mapActions as _mapActions, createNamespacedHelpers } from 'vuex'; import { useActionMapper } from './useMapper'; /** * mapAction * @description 参考 vuex 的 mapAction * https://vuex.vuejs.org/zh/guide/actions.html#%E5%9C%A8%E7%BB%84%E4%BB%B6%E4%B8%AD%E5%88%86%E5%8F%91-action */ export const mapActions = (map: {}) => { let mapperFn = _mapActions; return useActionMapper(map, mapperFn) as any; };