类似实现这类功能;
方法一
<el-table-column width="150">
<template slot="header" slot-scope="slot">
<span class="strategy-column">*</span>
<span>告警类型</span>
</template>
<template slot-scope="scope">
...
</template>
</el-table-column>
方法二
// template
<el-table-column :render-header="renderHeader" label="产品名称">
...
</el-table-column>
// methods
renderHeader(h, { column, $index }) {
return h('span', [
h('span', {
domProps: {
innerHTML: '*'
},
style: {
color: '#F56C6C',
fontSize: '16px',
marginRight: '3px'
}
}),
h('span', column.label)
])
},