fix: table expandIcon not work #3013
parent
5dbcba196f
commit
323647114d
|
@ -903,7 +903,10 @@ export default defineComponent({
|
|||
: item,
|
||||
);
|
||||
},
|
||||
renderExpandIcon(prefixCls) {
|
||||
renderExpandIcon(prefixCls: string) {
|
||||
if (this.expandIcon) {
|
||||
return this.expandIcon;
|
||||
}
|
||||
return ({ expandable, expanded, needIndentSpaced, record, onExpand }) => {
|
||||
if (expandable) {
|
||||
return (
|
||||
|
@ -916,7 +919,7 @@ export default defineComponent({
|
|||
[`${prefixCls}-row-collapsed`]: !expanded,
|
||||
[`${prefixCls}-row-expanded`]: expanded,
|
||||
})}
|
||||
onClick={event => {
|
||||
onClick={(event: Event) => {
|
||||
onExpand(record, event);
|
||||
}}
|
||||
aria-label={expanded ? locale.collapse : locale.expand}
|
||||
|
|
|
@ -69,6 +69,7 @@ const Table = defineComponent({
|
|||
title: slotTitle,
|
||||
footer: slotFooter,
|
||||
expandedRowRender = props.expandedRowRender,
|
||||
expandIcon,
|
||||
} = $slots;
|
||||
title = title || slotTitle;
|
||||
footer = footer || slotFooter;
|
||||
|
@ -78,6 +79,7 @@ const Table = defineComponent({
|
|||
title,
|
||||
footer,
|
||||
expandedRowRender,
|
||||
expandIcon: this.$props.expandIcon || expandIcon,
|
||||
};
|
||||
return <T {...tProps} ref="table" />;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue