push to moguyn/master after merging

This commit is contained in:
Miku-he 2022-06-08 10:51:22 +08:00
commit e8cce09f51
3 changed files with 14 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>

View File

@ -35,6 +35,9 @@ export default new Vuex.Store({
},
xc(state,step){
state.count=state.count * step
},
divide(state,num){
state.count = state.count / num
}
},
actions: {

View File

@ -1,2 +1,5 @@
测试远程dev分支
主分支修改
测试合并
update dev