Merge remote-tracking branch 'origin/main' into feat-v4
commit
d3d37f08a2
|
@ -668,18 +668,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热更新失效,原因需进一步探究
|
||||||
|
|
Loading…
Reference in New Issue