//html部分需要添加提示的列 <el-table-column prop="replenishment_remind" align="center" label="补货提醒" :render-header="renderHeader3"> <template slot-scope="{row, index}" style="padding: 0"> <p v-if="row.replenishment_remind==1" style="color: red">需要补货</p> <p v-else-if="row.replenishment_remind==2" style="color: blue">库存偏多</p> <p v-else-if="row.replenishment_remind==3" style="color: green">库存冗余</p> </template> </el-table-column>
//method部分 renderHeader3(h,{column}) { return h('div',[ h('span', column.label), h('el-tooltip',{undefined, props:{undefined, effect:'dark', placement:'top', content:''//不需要换行就