Browse Source

fix: table not work

tangjinzhou-patch-1
tangjinzhou 2 years ago
parent
commit
1e0cefa786
  1. 4
      components/table/Table.tsx

4
components/table/Table.tsx

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

Loading…
Cancel
Save