Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed Apr 25, 2017
1 parent f33dfde commit a3442cc
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions components/grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</head>

<body>
<div ms-controller="grid">
<table border=1>
<script type='text' id='aaa'>
<table border='1'>
<tr>
<td>a</td>
<td>b</td>
Expand All @@ -22,6 +22,9 @@
</tr>

</table>
</script>
<div ms-controller="grid" ms-html='@html'>
异步的模板与异步的数据
</div>

<style>
Expand All @@ -30,6 +33,7 @@
<script>
var vm = avalon.define({
$id: 'grid',
html: '',
arr: [{
a: 111,
b: 222,
Expand All @@ -45,15 +49,18 @@
}]
});
setTimeout(function() {
vm.arr = [{
a: "aaa",
b: 'bbb',
c: "ccc"
}, {
a: "xxx",
b: 'yyy',
c: "zzz"
}]
vm.html = document.getElementById('aaa').text
setTimeout(function() {
vm.arr = [{
a: "aaa",
b: 'bbb',
c: "ccc"
}, {
a: "xxx",
b: 'yyy',
c: "zzz"
}]
}, 1000)
}, 1000)
</script>
</body>
Expand Down

0 comments on commit a3442cc

Please sign in to comment.