1.阻止事件冒泡<div @click="divClick"> this is a btn father div <button @click.stop="btnClick">this is a button in div</button> </div>
通过stop来防止
2.阻止默认行为
prevent
3.只触发一次回调
.once
2024-01-05 11:13:22
1.阻止事件冒泡<div @click="divClick"> this is a btn father div <button @click.stop="btnClick">this is a button in div</button> </div>
通过stop来防止
2.阻止默认行为
prevent
3.只触发一次回调
.once