-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
qincheng.zhong
committed
Aug 13, 2015
1 parent
e1046a0
commit a3c0f30
Showing
2 changed files
with
25 additions
and
1,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.