< html lang= "en" >
< head >
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
< / head >
< body >
<!-- -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<div @click="div">
<span @click="span">1231</span>
</div>
</div>
<script>
new Vue({
el: "-sharpapp",
data: {
},
methods: {
span() {
console.log("span");
},
div() {
console.log("div");
},
}
})
</script>
< / body >
< / html >
trigger span, first and then div