在工作中遇到过两种数据格式 需要渲染成table,分为别
一、
<el-table border :data="table.column_data" size='small'>
<el-table-column align="center" v-for="(item,index) in table.column_name" :key="index" :label="item">
<template slot-scope="scope">
{
{scope.row[index]}}
</template>
</el-table-column>
</el-table>
数据:
table: {
column_name: ["字段名", "类型", "别名", "描述"],
column_data: [
["create_time", "BIGINT", "create_time", "创建事件"],
["host_ip", "STRING",