Commit 64b6313b4e43fdc2e9b292f554889b845e26182f

Authored by Vben
1 parent 1e669870

fix(table): ensure data responsiveness, fix #447

src/components/Table/src/hooks/useTable.ts
@@ -83,7 +83,7 @@ export function useTable( @@ -83,7 +83,7 @@ export function useTable(
83 getTableInstance().setLoading(loading); 83 getTableInstance().setLoading(loading);
84 }, 84 },
85 getDataSource: () => { 85 getDataSource: () => {
86 - return toRaw(getTableInstance().getDataSource()); 86 + return getTableInstance().getDataSource();
87 }, 87 },
88 getColumns: ({ ignoreIndex = false }: { ignoreIndex?: boolean } = {}) => { 88 getColumns: ({ ignoreIndex = false }: { ignoreIndex?: boolean } = {}) => {
89 const columns = getTableInstance().getColumns({ ignoreIndex }) || []; 89 const columns = getTableInstance().getColumns({ ignoreIndex }) || [];
src/views/demo/table/tableData.tsx
@@ -244,22 +244,9 @@ export function getFormConfig(): Partial<FormProps> { @@ -244,22 +244,9 @@ export function getFormConfig(): Partial<FormProps> {
244 ...getAdvanceSchema(5), 244 ...getAdvanceSchema(5),
245 { 245 {
246 field: `field11`, 246 field: `field11`,
247 - label: `字段33`, 247 + label: `Slot示例`,
248 component: 'Select', 248 component: 'Select',
249 - defaultValue: '1',  
250 slot: 'custom', 249 slot: 'custom',
251 - componentProps: {  
252 - options: [  
253 - {  
254 - label: '选项1',  
255 - value: '1',  
256 - },  
257 - {  
258 - label: '选项2',  
259 - value: '2',  
260 - },  
261 - ],  
262 - },  
263 colProps: { 250 colProps: {
264 xl: 12, 251 xl: 12,
265 xxl: 8, 252 xxl: 8,