<div @click="onClickOuter"> <button @click.stop="onClick">click!</button> </div>
new Vue({ el: '#app', methods: { onClick() { alert('Hello world!') }, onClickOuter() { alert('Click outer!') } } })
元記事に戻る