<script>
import { mapState, mapGetters, mapMutations, mapActions } from "vuex";
// 为什么要使用 createNamespacedHelpers ? 因为引入了两个 Vuex 模块用于区分吗?
import {createNamespacedHelpers} from 'vuex'
const {mapState:mapStateUser,mapActions:mapActionUser,mapMutations:mapMutaionuser} = createNamespacedHelpers('user')
const {mapState:mapStateCart,mapActions:mapActionCart,mapMutations:mapMutaionCart} = createNamespacedHelpers('cart')
export default {
}
</script>
在组件中使用 import {createNamespacedHelpers} from 'vuex' 有什么作用?