vue:使用v-on:event
绑定事件,或者使用@event绑定事件,例如:
<button v-on:click="counter += 1">Add 1button>
<button v-on:click.stop="counter+=1">Add1button> //阻止事件冒泡
小程序中,全用bindtap(bind+event)
,或者catchtap(catch+event)
绑定事件,例如:
<button bindtap="noWork">emmbutton>
<button catchtap="noWork">emmbutton> //阻止事件冒泡
原创©本文章为梁鹏翱原创,未经许可,禁止转载
0条评论