2022-06-10 15:35:58 +08:00

29 lines
784 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--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>
<h2>当前语录列表中的总条数为{{ showListLength }}</h2>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions, mapGetters } from "vuex";
export default {
data() {
return {};
},
methods: {
...mapMutations("countOptions", ["subN", "xc"]),
...mapActions("countOptions", ["subNAsync"]),
},
computed: {
...mapState("countOptions", ["count"]),
...mapGetters("countOptions", ["showNum", "showNum1"]),
...mapGetters("anaOptions", ["showListLength"]),
},
};
</script>