fix: table expandedRowRender
parent
b6a15f5930
commit
f0337cebde
|
@ -892,8 +892,10 @@ export default {
|
|||
return ({ expandable, expanded, needIndentSpaced, record, onExpand }) => {
|
||||
if (expandable) {
|
||||
return (
|
||||
<LocaleReceiver componentName="Table" defaultLocale={defaultLocale.Table}>
|
||||
{locale => (
|
||||
<LocaleReceiver
|
||||
componentName="Table"
|
||||
defaultLocale={defaultLocale.Table}
|
||||
children={locale => (
|
||||
<TransButton
|
||||
class={classNames(`${prefixCls}-row-expand-icon`, {
|
||||
[`${prefixCls}-row-collapsed`]: !expanded,
|
||||
|
@ -906,7 +908,7 @@ export default {
|
|||
noStyle
|
||||
/>
|
||||
)}
|
||||
</LocaleReceiver>
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ const Table = {
|
|||
const style = element.props?.style || {};
|
||||
const cls = element.props?.class || '';
|
||||
const props = getPropsData(element);
|
||||
const { default: children, ...restSlots } = element.children;
|
||||
const { default: children, ...restSlots } = element.children || {};
|
||||
const column = { ...restSlots, ...props, style, class: cls };
|
||||
if (key) {
|
||||
column.key = key;
|
||||
|
|
|
@ -233,7 +233,7 @@ const ExpandableTable = {
|
|||
const needIndentSpaced = data.some(record => record[childrenColumnName]);
|
||||
|
||||
return getSlot(this, 'default', {
|
||||
...props,
|
||||
props,
|
||||
...this.$attrs,
|
||||
needIndentSpaced,
|
||||
renderRows: this.renderRows,
|
||||
|
|
|
@ -175,11 +175,6 @@ export default {
|
|||
|
||||
this.debouncedWindowResize = debounce(this.handleWindowResize, 150);
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
table: this,
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
|
|
Loading…
Reference in New Issue