摘要:
<div id="app"> <p>{{count}}</p> <p> <button @click="addclick">+</button> <button @click="reduceclick">-</button> </p> </div> let store = new Vuex.Store({ state:{ count:0 }, mutations:{ add:state => st 阅读全文
posted @ 2019-09-29 15:17
石头记1
阅读(207)
评论(0)
推荐(0)
摘要:
触发的自定义事件要放到注册的组件上 1通过点击: <div id="app"> <div v-text="money" @click="reduce"></div> <child :m="money" @zdyclick="add"></child> </div> <template id="tem 阅读全文
posted @ 2019-09-29 15:14
石头记1
阅读(335)
评论(0)
推荐(0)