diff --git a/components/table/Table.jsx b/components/table/Table.jsx index e0a00d2f8..845fbd4a9 100755 --- a/components/table/Table.jsx +++ b/components/table/Table.jsx @@ -1146,7 +1146,9 @@ export default { getPopupContainer: contextGetPopupContainer, transformCellText, }) { - const { showHeader, locale, getPopupContainer, ...restProps } = getOptionProps(this); + const { showHeader, locale, getPopupContainer, expandIcon, ...restProps } = getOptionProps( + this, + ); const data = this.getCurrentPageData(); const expandIconAsCell = this.expandedRowRender && this.expandIconAsCell !== false; @@ -1190,7 +1192,7 @@ export default { const vcTableProps = { key: 'table', props: { - expandIcon: this.renderExpandIcon(prefixCls), + expandIcon: expandIcon || this.renderExpandIcon(prefixCls), ...restProps, customRow: (record, index) => this.onRow(prefixCls, record, index), components: this.sComponents, diff --git a/components/table/index.jsx b/components/table/index.jsx index b54793396..1441b0690 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -112,6 +112,7 @@ const Table = { title: slotTitle, footer: slotFooter, expandedRowRender = props.expandedRowRender, + expandIcon, } = $scopedSlots; title = title || slotTitle; footer = footer || slotFooter; @@ -122,6 +123,7 @@ const Table = { title, footer, expandedRowRender, + expandIcon: this.$props.expandIcon || expandIcon, }, on: getListeners(this), };