0
点赞
收藏
分享

微信扫一扫

Element 中使用 slot-scope 遍历二级数组


<!-- list 为每个表格行中 的一个数组对象 -->
<el-table-column label="增长" width="600" prop="list">
    <!-- scope名称随便取,代表整个表格数据 -->
    <template slot-scope="scope">
        <div class="cell-class">
            <div v-for="(item,index) in scope.row.list" :key="index">
                <div>{{item.name}}</div>
                <div>{{item.value}}</div>
            </div>
        </div>
    </template>
</el-table-column>

举报

相关推荐

0 条评论