customRender: function (text, record, index) {
let colors = ['#BFBFBF', '#00A854', '#0E77D1', '#faad14', '#ff0000', '#b30ed1']
let style = {
style: `margin-right:4px;color:${colors[record.state]};font-family: 'Lucida Grande ', 'Lucida Grande';`,
}
return (
<div>
<span {...style}>●</span>
<span>{text}</span>
</div>
)
},
AntDesignVue table的customRender(style动态赋值)
最新推荐文章于 2024-08-04 16:33:59 发布