vue3.0 封装vuex的mapState、mapGetter、mapAction
vue3.0使用vuex的mapState、mapGetter、mapAction参考大佬的封装方法,封装vuex的mapState、mapGetter、mapAction,更方便使用新建useMapper.jsimport { useStore } from 'vuex'import { computed } from 'vue'export function useStateMapper(mapper, mapFn) { const store = useStore();
原创
2022-04-06 17:14:44 ·
2136 阅读 ·
2 评论