Skip to content

Commit a3c0f30

Browse files
author
qincheng.zhong
committed
update2
1 parent e1046a0 commit a3c0f30

File tree

2 files changed

+25
-1086
lines changed

2 files changed

+25
-1086
lines changed

index.html

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,31 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
3-
<meta charset="utf-8">
4-
<title>duplexHooks</title>
5-
<meta http-equiv="X-UA-Compatible" content="IE=8" />
6-
<script src="avalon.js"></script>
7-
<link rel="stylesheet" href="animate.css" type="text/css">
8-
9-
<style>
10-
.bp{
11-
border: 1px solid green;
12-
}
13-
.contain{
14-
border: 1px solid red;
15-
}
16-
</style>
17-
18-
19-
</head>
20-
<body>
4+
<title>Avalon by RubyLouvre</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6+
<script src="avalon.js" ></script>
7+
218
<script>
22-
function expect(a) {
23-
return {
24-
to: {
25-
be: function (b) {
26-
console.log(a, b, a === b)
27-
}
28-
}
29-
}
30-
}
31-
function heredoc(fn) {
32-
return fn.toString().replace(/^[^\/]+\/\*!?\s?/, '').replace(/\*\/[^\/]+$/, '')
33-
}
34-
var a = 111
35-
var vm = avalon.define({
36-
$id: 'testvv',
37-
postData: {
38-
venue: '3323',
39-
aa: 333
40-
}
41-
})
42-
vm.postData.$watch('venue', function (val) {
43-
a = val
44-
})
45-
setTimeout(function () {
46-
vm.postData = {
47-
venue: '11',
48-
aa: 444
49-
}
50-
}, 200)
51-
setTimeout(function () {
52-
expect(a).to.be("11")
53-
// clearTest(vm, 0, done)
54-
}, 350)
9+
avalon.define({
10+
$id: "test",
11+
string: "xxx",
12+
bool: true,
13+
number: 100,
14+
object: {
15+
aaa: "aaa",
16+
bbb: "bbb"
17+
}
18+
})
5519
</script>
20+
</head>
21+
<body>
22+
<div ms-controller="test">
23+
<input ms-duplex="string">{{string}}
24+
<input ms-duplex="bool" type="radio">{{bool}}
25+
<input ms-duplex="number" >{{number}}
26+
<ul>
27+
<li ms-repeat="object">{{$key}} --> {{$val}}</li>
28+
</ul>
29+
</div>
5630
</body>
5731
</html>

0 commit comments

Comments
 (0)