需求背景
table表格要实现如下效果,一行数据会对应多个数据。效果如下:
代码开发
<el-table-column prop="listAlarmGroups" fixed="right" label="报警组" width="200">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper" v-for="(item,index) in scope.row.listAlarmGroups" :key="index">
<el-tag>{{ item }}</el-tag>
</div>
</template>
</el-table-column>