vue中在表格里渲染对象
2020-05-20 本文已影响0人
小水嘀哩哒
<el-table-column
label="标签"
header-align="center"
align="center"
show-overflow-tooltip
width="200"
>
<template slot-scope="scope">
<p class="labelDiv">
<span v-for="(items,key,index) of scope.row.Labels" :key="index" class="labels">{{key}}:{{items}}</span>
</p>
</template>
</el-table-column>
data=[
{
name:'张三',
labels:{
color:red,
age:18
}
}
]