Vue3使用render画图标实践
iv2.render = function ({ record }) {
return h(
resolveComponent('a-button'),
{
type: 'text',
shape: 'circle',
size: 'mini',
status: record[iv2.dataIndex] ? 'success' : 'warning',
style: {
marginTop: '8px',
marginBottom: '8px'
}
},
{
icon: () => {
return record[iv2.dataIndex]
? h(resolveComponent('iconCheckCircle'))
: h(resolveComponent('iconCloseCircle'))
}
}
)
}
注:resolveComponent,h 从vue中导入;iconCheckCircle,iconCloseCircle为arco.design中的图标