代码拉取完成,页面将自动刷新
<!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;
}
.aaa{
color:green;
}
</style>
<script >
var model = avalon.define("test", function(vm) {
vm.items = {
aaa: 1,
bbb: 2,
ccc: {
a: 1,
b: 1,
c: 1
}
}
})
setTimeout(function() {
console.log("==================")
model.items = {
kkk: -1,
fff: 0,
ccc: {
a: "xxx",
b: "yyy",
d: {
kkk:444
}
},
eee: 3,
bbb: "zzz"
}
}, 2000)
</script>
</head>
<body >
<div ms-controller="test">
<div ms-with="items">
<p>{{$key}}-------------------{{$val}}</p>
<ul ms-with="$val">
<li>{{$key}}:{{$val}}
<div ms-with="$val">
<h3>{{$key}}</h3>
</div>
</li>
</ul>
</div>
</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。