<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.outer{
width: 180px;
height: 180px;
background:gold;
margin: 100px auto;
padding: 30px;
border-radius: 50%;
}
.outer .center{
width: 130px;
height: 130px;
padding: 30px;
background:pink;
border-radius: 50%;
}
.outer .center .inner{
width: 130px;
height: 130px;
background:cyan;
border-radius: 50%;
}
</style>
</head>
<body>
<div id="app">
<!-- 如果三个div @click的什么属性都不加那么就是从而向外冒泡执行 -->
<div class="outer" @click.capture="outer">
<div class="center" @click.capture="center">
<div class="inner" @click="inner"></div>
</div>
</div>
</div>
<script src="js/vue.js"></script>
<script>
var vue = new Vue({
el:"#app",
methods:{
outer() {
console.log("外层")
},
center() {
console.log("中间")
},
inner(event) {
console.log("内层")
}
}
})
</script>
</body>
</html>

vue事件修饰符:@click.capture捕获内层事件,从而改变默认的冒泡执行顺序_html