【VUE】vue + element-ui实现表格一个单元格中加多行数据

需求背景

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>
posted @ 2022-11-10 19:26  彬在俊  阅读(2360)  评论(0)    收藏  举报