像是这种数据:
地址_乡: ""
地址_县: "通州"
地址_市: "市辖区"
地址_村: null
地址_省: "北京市"
填写说明: null
填表人: ""
常住人口数量: 692
年末总户数: 181
应急供水设备数量: "0"
应急医疗设备数量: "0"
需要先在获取的时候处理,放入第三方变量,在渲染时循环
for (const key in res.data.data[) {
this.headers.push(key)
}
<el-table-column :label="item" v-for="(item, index) in headers" :key="index">
<template slot-scope="scope">
{{scope.row[item]}}
</template>
</el-table-column>