fix: table not work

tangjinzhou-patch-1
tangjinzhou 2023-05-20 15:49:17 +08:00
parent bba322702e
commit 1e0cefa786
1 changed files with 2 additions and 2 deletions

View File

@ -701,18 +701,18 @@ const Table = defineComponent({
customFilterDropdown?: any; customFilterDropdown?: any;
default: any; default: any;
}>, }>,
setup(_props, { attrs, slots, expose }) { setup(props, { attrs, slots, expose }) {
const table = ref(); const table = ref();
expose({ expose({
table, table,
}); });
return () => { return () => {
const props = attrs as TableProps;
const columns = props.columns || convertChildrenToColumns(slots.default?.()); const columns = props.columns || convertChildrenToColumns(slots.default?.());
return ( return (
<InteralTable <InteralTable
ref={table} ref={table}
{...attrs} {...attrs}
{...props}
columns={columns || []} columns={columns || []}
expandedRowRender={slots.expandedRowRender} expandedRowRender={slots.expandedRowRender}
contextSlots={{ ...slots }} // use new object, slot contextSlots={{ ...slots }} // use new object, slot