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

View File

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

View File

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