实现效果:
具体实现:在表格内容中添加以下内容
customRender: function ({text, record, index, column}) {
return createVNode(Tooltip, {placement: 'left', title: text}, text)
}
时间这样处理
{
title: '更新时间', dataIndex: 'updateTime', width: 90, align: 'center',
customRender: function ({text, record, index, column}) {
if (text) {
const dateStr = dayjs(text).format("YYYY-MM-DD")
const timeStr = dayjs(text).format("HH:mm:ss")
return h('div', [h('div', `${dateStr}`), h('div', `${timeStr}`)])
}
return text
}
},
前面有文章利用插槽实现的,大家自行选择方法