tmColumns: [
{
title: '申请日期',
dataIndex: 'applyDate',
key: 'applyDate',
ellipsis: true,
},
{
title: '申请人',
dataIndex: 'applyPerson',
key: 'applyPerson',
customCell: (record, rowIndex) => { //在此处可以修改单元格中的样式
return { style: { 'color': 'red', '-webkit-line-clamp': 2, } } //return 想要设置的样式
},
customRender: (text, row, index) => { // 在此处可以修改单元格中的内容包一层div,给div加样式
var child = this.$createElement("div", {
domProps: {
innerHTML: text,
className: 'aabb'
}
})
var obj = {
children: child,
}
return obj
}
},
{
title: '代理机构',
dataIndex: 'agency',
key: 'agency',
ellipsis: true,
},
],
vue+Ant Design 中的table想修改单元格中的样式
最新推荐文章于 2024-04-10 17:52:59 发布