From 64b6313b4e43fdc2e9b292f554889b845e26182f Mon Sep 17 00:00:00 2001 From: Vben Date: Thu, 8 Apr 2021 00:06:30 +0800 Subject: [PATCH] fix(table): ensure data responsiveness, fix #447 --- src/components/Table/src/hooks/useTable.ts | 2 +- src/views/demo/table/tableData.tsx | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/components/Table/src/hooks/useTable.ts b/src/components/Table/src/hooks/useTable.ts index 57edd2bb..1afd34b2 100644 --- a/src/components/Table/src/hooks/useTable.ts +++ b/src/components/Table/src/hooks/useTable.ts @@ -83,7 +83,7 @@ export function useTable( getTableInstance().setLoading(loading); }, getDataSource: () => { - return toRaw(getTableInstance().getDataSource()); + return getTableInstance().getDataSource(); }, getColumns: ({ ignoreIndex = false }: { ignoreIndex?: boolean } = {}) => { const columns = getTableInstance().getColumns({ ignoreIndex }) || []; diff --git a/src/views/demo/table/tableData.tsx b/src/views/demo/table/tableData.tsx index 347f036e..cedbc5fb 100644 --- a/src/views/demo/table/tableData.tsx +++ b/src/views/demo/table/tableData.tsx @@ -244,22 +244,9 @@ export function getFormConfig(): Partial { ...getAdvanceSchema(5), { field: `field11`, - label: `字段33`, + label: `Slot示例`, component: 'Select', - defaultValue: '1', slot: 'custom', - componentProps: { - options: [ - { - label: '选项1', - value: '1', - }, - { - label: '选项2', - value: '2', - }, - ], - }, colProps: { xl: 12, xxl: 8, -- GitLab