update dev's content

This commit is contained in:
2022-06-08 10:44:18 +08:00
parent ff901ef6ea
commit 1b5f17423d
3 changed files with 12 additions and 4 deletions

View File

@@ -1,20 +1,24 @@
<template>
<div>
这是box组件测试,test
<div>这是box组件测试,test</div>
<button @click="divide(2)">除2</button>
<div>count的值为{{count}}</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data(){
return{ }
},
methods:{
divide(num){
this.$store.commit('divide',num)
}
},
computed:{
...mapState(['count'])
}
}
</script>