1.在需要加必填星号的el-table-column上添加render-header属性
<el-table-column :label="getName('产品代码')" :render-header="addRedStart" prop="MODELCODE" min-width=“4.5%”>
<template v-slot="scope">
<el-input v-model.lazy="scope.row.MODELCODE" /></template>
</el-table-column>
const addRedStart = ({column}) =>{
return [
h('span',{style:'color:#F56C6C'},'*'),
h('span',' ' + column.label)
]
}