store = { state:{ username:"Alley", age:20 } } this.$store.state.username this.$store.state.age {{username}} {{age}} import {mapState} from "vuex"; export default { computed:{ ...mapState({ username:(state)=>state.username, age:state=>state.age }) } }