//表格优化 bodyCell(column) { if(column.column?.key!=='operation'){ column.column.width = 'auto'; } if(column.column.render){ const cellRender = column.column.render.bind(this) return ( <antTooltip title={column.column?.key!=='operation'&&column?.value}> <p> {cellRender(column.value, column.record, column.index)} </p> </antTooltip> ) }else{ return ( <antTooltip title={column?.value}> <p> <span> {column?.value} </span> </p> </antTooltip> ) } } <antTable
v-slots={{ bodyCell: this.bodyCell }}></antTable>
标签:表格,render,column,tooltip,bodyCell,cellRender From: https://www.cnblogs.com/xinyouhunran/p/18311607