vue3:
const renderHeaderMethods = ({ column }) => { return createVNode( resolveComponent('el-tooltip'), { effect: 'dark', content: column.label, placement: 'top' }, { default: createVNode( 'span', { class: 'fa fa-exclamation-circle icon my-tooltip' }, column.label.length > 7 ? column.label.substr(0, 7) + '...' : column.label ) } ); };
<el-table-column label="透平发电机组IGV维保测试/3个月" prop="alternatoIgvMaintain" header-align="center" align="center" width="150px" :show-overflow-tooltip="true" :render-header="renderHeaderMethods" />
vue2: renderHeader(h, data) { return h("span", [ h( "el-tooltip", { attrs: { class: "item", effect: "dark", content: data.column.label, placement: "top", }, }, [h("span", data.column.label)] ), ]); },
标签:elementplus,span,column,tooltip,label,表头,vue3,data From: https://www.cnblogs.com/zhangxingxia/p/17928965.html