不使用map辅助函数:
computed: { test:()=> this.$store.getters.doSome }
使用map辅助函数:
computed: { ...mapGetters({ ‘test‘: ‘doSome‘ }) }
computed: { ...mapGetters({ ‘tes1t‘: ‘doSome1‘, ‘test2‘:‘doSome2‘, ‘user‘: ‘user‘ }) }
这样更方便
参考资料>>>
原文:https://www.cnblogs.com/adongyo/p/12109282.html