diff --git a/components/vc-table/Body/BodyRow.tsx b/components/vc-table/Body/BodyRow.tsx index d3ee09ed0..31e959045 100644 --- a/components/vc-table/Body/BodyRow.tsx +++ b/components/vc-table/Body/BodyRow.tsx @@ -147,7 +147,24 @@ export default defineComponent>({ if (column.customCell) { additionalCellProps = column.customCell(record, index, column); } - + // not use slot to fix https://github.com/vueComponent/ant-design-vue/issues/5295 + const appendNode = + colIndex === (expandIconColumnIndex || 0) && nestExpandable.value ? ( + <> + + {expandIcon({ + prefixCls, + expanded: expanded.value, + expandable: hasNestChildren.value, + record, + onExpand: onInternalTriggerExpand, + })} + + ) : null; return ( >({ additionalProps={additionalCellProps} column={column} transformCellText={transformCellText} - v-slots={{ - // ============= Used for nest expandable ============= - appendNode: - colIndex === (expandIconColumnIndex || 0) && nestExpandable.value - ? () => { - return ( - <> - - {expandIcon({ - prefixCls, - expanded: expanded.value, - expandable: hasNestChildren.value, - record, - onExpand: onInternalTriggerExpand, - })} - - ); - } - : undefined, - }} + appendNode={appendNode} /> ); })}