element ui 中可以通过设置slot-scope 定值列,但是增加超级链接需要采用v-bind来修饰一下:
<el-table :data="tableData">
<el-table-column v-for="(item, index) in tableHeader"
:label="item"
:column-key="item"
:prop="item"
:key="index"
>
<template slot-scope="scope"> {{ scope.row[item] }}</template>
</el-table-column>
<af-table-column>
<template slot-scope="scope">
<el-link v-bind:href="'engineeringElementOperation/exportToFile/?id='+scope.row['id']">
{{ oname }}
</el-link>
</template>
</af-table-column>
</el-table>
请注意<el-link>标签的写法。