<el-table-column prop="status" :render-header="renderHeader" >
<template slot-scope="scope">{{scope.row.status}}</template>
</el-table-column>
renderHeader(h, { column}) {
return [
column.property,
h(
'el-tooltip',
{
props: {
content: (function() {
return `${column.property}`
})(),
placement: 'top'
}
},
[
h('span', {
class: {
'el-icon-question': true
}
})
]
)
]
}
本文介绍了如何在Element UI的el-table中实现列状态的动态渲染,并展示了renderHeader函数的应用,通过自定义tooltip为列头提供额外的解释。
1万+

被折叠的 条评论
为什么被折叠?



