您的位置:首页 > Web前端 > Vue.js

Vue.js学习及总结——循环展示

2015-12-22 16:02 573 查看

 

html

<table id="show">
<template v-for="item in items">
<tr>
<td>{{ item.msg }}</td>
<td>{{ item.kk }}</td>
<td>{{ item.ll }}</td>
</tr>
</template>
</table>

 js

var ex1 = new Vue({
el: '#show',
data: {
parentMessage: 'Parent',
items: [
{msg: '11111',kk: '11111111',ll:'1111111111111'},
{msg: '22222',kk: '222222222222',ll:'222222222222222'},
{msg: '3333333333333',kk: '33333333333',ll:'3333333333333'},
{msg: '4444444444',kk: '4444444444444',ll:'44444444444'},
{msg: '5555555555555',kk: '55555555555555',ll:'555555555555555'},
]
}
});

 

效果


 

 

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: