Skip to content

Commit

Permalink
update2
Browse files Browse the repository at this point in the history
  • Loading branch information
qincheng.zhong committed Aug 13, 2015
1 parent e1046a0 commit a3c0f30
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1,086 deletions.
76 changes: 25 additions & 51 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,57 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>duplexHooks</title>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<script src="avalon.js"></script>
<link rel="stylesheet" href="animate.css" type="text/css">

<style>
.bp{
border: 1px solid green;
}
.contain{
border: 1px solid red;
}
</style>


</head>
<body>
<title>Avalon by RubyLouvre</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="avalon.js" ></script>

<script>
function expect(a) {
return {
to: {
be: function (b) {
console.log(a, b, a === b)
}
}
}
}
function heredoc(fn) {
return fn.toString().replace(/^[^\/]+\/\*!?\s?/, '').replace(/\*\/[^\/]+$/, '')
}
var a = 111
var vm = avalon.define({
$id: 'testvv',
postData: {
venue: '3323',
aa: 333
}
})
vm.postData.$watch('venue', function (val) {
a = val
})
setTimeout(function () {
vm.postData = {
venue: '11',
aa: 444
}
}, 200)
setTimeout(function () {
expect(a).to.be("11")
// clearTest(vm, 0, done)
}, 350)
avalon.define({
$id: "test",
string: "xxx",
bool: true,
number: 100,
object: {
aaa: "aaa",
bbb: "bbb"
}
})
</script>
</head>
<body>
<div ms-controller="test">
<input ms-duplex="string">{{string}}
<input ms-duplex="bool" type="radio">{{bool}}
<input ms-duplex="number" >{{number}}
<ul>
<li ms-repeat="object">{{$key}} --> {{$val}}</li>
</ul>
</div>
</body>
</html>
Loading

0 comments on commit a3c0f30

Please sign in to comment.