<!--moguyun-->
<template>
    <div>
        <h3>当前最新的count值为：{{count}}</h3>
        <button @click="subN(2)">-2</button>
        <button @click="xc(10)">*10</button>
        <button @click="subNAsync(10)">-10 Async</button>
        <h3>{{showNum1}}</h3>
    </div>
</template>

<script>
import { mapState,mapMutations,mapActions,mapGetters } from "vuex";
export default {
    data(){
        return{ }
    },
    methods:{
        ...mapMutations(['subN','xc']),
        ...mapActions(['subNAsync']),
    },
    computed:{
        ...mapState(['count']),
        ...mapGetters(['showNum','showNum1'])
    }
}
</script>