Vue+Element自定义纵向表格表头
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element

·
代码如下:
<table style="width: 100%" class="myTable">
<tr v-for="(item,i) in statDatas" :key="i">
<td class="column">{{ item.key }}</td>
<td class="column">{{ item.value }}</td>
</tr>
</table>
绑定的是 statDatas 属性是一个 json数组,由key value组成的json,如果需要多列就直接增加属性就可以。
优美样式:
.myTable {
border-collapse: collapse;
margin: 0 auto;
text-align: center;
}
.myTable td,
.myTable th {
border: 1px solid #cad9ea;
color: #666;
height: 60px;
}




A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:16 天前 )
c345bb45
1 年前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 1 年前
更多推荐
所有评论(0)