1 Star 0 Fork 0

zhengchen/avalon

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
index_with3.html 1.70 KB
Copy Edit Raw Blame History
qincheng authored 2014-02-09 12:15 . 重命名例子
<!DOCTYPE html>
<html>
<head>
<title>ms-with</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="avalon.js"></script>
<style>
.red{
color:red;
}
.green{
color:greenyellow;
}
</style>
<script >
var model = avalon.define('test', function(vm) {
vm.first = {
a: 1,
b: 1,
c: 1,
d: 1
}
});
setTimeout(function() {
console.log("测试修改")
model.first = {
a: 3,
b: 3,
c: 3,
d: 3
}
}, 1000)
setTimeout(function() {
console.log("测试移除")
model.first = {
a: 3,
b: 3
}
}, 2000)
setTimeout(function() {
console.log("测试添加")
model.first = {
a: 3,
b: 3,
f: 4,
g: 4
}
}, 3000)
setTimeout(function() {
console.log("测试排序")
model.first = {
g: 4,
f: 4,
b: 3,
a: 3
}
}, 4000)
</script>
</head>
<body >
<div ms-controller="test" ms-with="first">
<h1>{{$key}}-------------------{{$val}}</h1>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cowboy13/avalon.git
git@gitee.com:cowboy13/avalon.git
cowboy13
avalon
avalon
master

Search