代码拉取完成,页面将自动刷新
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="avalon.js"></script>
<script>
var model = avalon.define('test', function(vm) {
vm.items = [
{name: "panel1"},
{name: "panel2"},
{name: "panel3"},
{name: "panel4"}
];
vm.selected = "panel1"
vm.index = 0
})
window.onload = function(){
console.log(document.body.innerHTML)
}
</script>
<style>
body, html{
height:100%;
}
.popup{
display:inline-block;
zoom:1;
vertical-align:middle;
margin-left: auto;
margin-right: auto;
}
.popup div{
width:300px;
height:300px;
background: #ddcda8;
}
.popup::after{
content:'center';
display:inline-block;
*display: inline;
zoom:1;
height:100%;
line-height:100%;
width:0;
overflow:hidden;
visibility:hidden;
vertical-align:middle;
}
</style>
</head>
<body>
<div ms-controller="test">
<select ms-duplex="selected">
<option ms-repeat="items" ms-value="el.name">加载面板{{$index+1}}</option>
</select>
<div ms-if-once="selected === 'panel1' " ms-include-src='"panel1.html"' >正在加载面板1</div>
<div ms-if-once="selected === 'panel2' " ms-include-src='"panel2.html"' >正在加载面板2</div>
<div ms-if-once="selected === 'panel3' " ms-include-src='"panel3.html"' >正在加载面板3</div>
<div ms-if-once="selected === 'panel4' " ms-include-src='"panel4.html"' >正在加载面板4</div>
</div>
<div class="popup" attr="dd" ms-ddd="ddd" id="333">
<div></div>
</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。