forked from alibaba/weex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent-bubble.we
45 lines (43 loc) · 872 Bytes
/
event-bubble.we
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<style>
.outer {
width: 750;
height: 600;
background-color: green;
}
.inner {
width: 600;
height: 400;
background-color: blue;
}
.link {
width: 750;
height: 100;
background-color: red;
}
</style>
<template>
<div class="outer" onclick="handleOuter">
<div class="inner" onclick="handleInner"></div>
<a onclick="test" class="link" href="https://h5.m.taobao.com">
<text onclick="textClick">click text</text>
</a>
</div>
</template>
<script>
module.exports = {
methods: {
handleOuter: function () {
console.log('click outer div!')
},
handleInner: function () {
console.log('click inner div!')
},
textClick: function () {
console.log('click text!')
},
test: function () {
console.log('click on a!')
}
}
}
</script>