forked from RubyLouvre/avalon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ms-on.html
60 lines (57 loc) · 1.65 KB
/
ms-on.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="avalon.js">
</script>
<script>
var vm = avalon.define({
$id: "test",
aaa: "ccc ddd",
onClick: function (n, e) {
console.log(n, e, "!")
},
move: function (e) {
console.log(e.pageX)
},
type: function (e) {
console.log(e.type)
},
toggle: true
})
</script>
</head>
<body ms-controller="test">
<div class="cookie">
<div class="round animated flip" style="background:red">
<div class="before">
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</div>
</div>
<style>
.cookie{
width:200px;
height:200px;
}
.round{
border-radius: 100px
}
.before{
display: none
}
.before p{
text-align: center;
}
</style>
<div ms-click="onClick(222)|stop|prevent">1111</div>
<div ><input ms-focus="type" ms-blur="type" ms-keyup="type"/> </div>
<div ms-mousemove="move" style="width:300px;height:100px;border:1px solid red">1111</div>
</body>
</html>