映射到局部的计算属性中,computed
//store/index.js/* 对state中的数据进行再次处理 */getters:{myCount(state){return "当前的数量:"+state.count}}//使用this.$store.getters.myCount;

//mapGetters将 store 中的 getter 映射到局部计算属性:import {mapGetters} from 'vuex'export default {name: 'home',computed:{...mapGetters(['myCount'])},...}//使用<template><div class="home"><h3>{{myCount}}</h3></div>
