<el-table @row-click="onRowClick" @selection-change="onSelectionChange" ref="testTable" :data="tableData" stripe :height="heightTable + 'px'" style=" 100%">
<template v-for="(item,index) in tableHead3">
<el-table-column :prop="item.column_name" :label="item.column_comment" v-html="item.column_name" :show-overflow-tooltip="true" align="center" :key="index" >
<template slot-scope="scope">
<span v-html="scope.row[scope.column.property]"></span>
<span v-html="scope.row[item.column_name]"></span>
</template>
</el-table-column>
</template>
</el-table>
export default {
name: 'Test',
data() {
return {
tableHead3:[{code: '<span style='color:#ff0000'>test1</span>'}, {code: '<span style='color:#ff0000'>test1</span>'}],
tableData: []
}
}
}