fix: table customRender set class and style not work #2004
parent
0b7481e8ab
commit
34ab34a135
|
@ -70,6 +70,8 @@ export default {
|
||||||
if (isInvalidRenderCellText(text)) {
|
if (isInvalidRenderCellText(text)) {
|
||||||
tdProps.attrs = text.attrs || {};
|
tdProps.attrs = text.attrs || {};
|
||||||
tdProps.props = text.props || {};
|
tdProps.props = text.props || {};
|
||||||
|
tdProps.class = text.class;
|
||||||
|
tdProps.style = text.style;
|
||||||
colSpan = tdProps.attrs.colSpan;
|
colSpan = tdProps.attrs.colSpan;
|
||||||
rowSpan = tdProps.attrs.rowSpan;
|
rowSpan = tdProps.attrs.rowSpan;
|
||||||
text = text.children;
|
text = text.children;
|
||||||
|
@ -99,7 +101,7 @@ export default {
|
||||||
tdProps.style = { textAlign: column.align, ...tdProps.style };
|
tdProps.style = { textAlign: column.align, ...tdProps.style };
|
||||||
}
|
}
|
||||||
|
|
||||||
const cellClassName = classNames(className || column.class, {
|
const cellClassName = classNames(className, column.class, {
|
||||||
[`${prefixCls}-cell-ellipsis`]: !!column.ellipsis,
|
[`${prefixCls}-cell-ellipsis`]: !!column.ellipsis,
|
||||||
// 如果有宽度,增加断行处理
|
// 如果有宽度,增加断行处理
|
||||||
// https://github.com/ant-design/ant-design/issues/13825#issuecomment-449889241
|
// https://github.com/ant-design/ant-design/issues/13825#issuecomment-449889241
|
||||||
|
|
Loading…
Reference in New Issue