遇到个问题就是其中有个要展示的数据来自接口返回的两个字段
原用法是:
<el-table-column prop="date(数据来源的某个字段)" label="日期(提示头部)" width="120">
原以为prop=" "中只能放一个字段的数据,想放两个字段数据的话,要把 </标签再用
标签包裹才行如下:
<el-table-column prop="provence,city" align="center" label="建设区域" width="120">
<template slot-scope="scope">
{{scope.row.provence}}-{{scope.row.city}}
</template>
</el-table-column>
记得原来<el-table-column></el-table-column>标签中的prop=" "中放两个字段
还有
<template slot-scope="scope"></template>中的slot-scope="scope" 最后通过{{scope.row.字段名}}就行