<el-table @row-click="onRowClick" @selection-change="onSelectionChange" ref="testTable" :data="tableData" stripe :height="heightTable  + 'px'" style="width: 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: []
}
}
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-08-13
猜你喜欢
  • 2021-12-27
  • 2023-01-13
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案