From e2708b868b2fbb126f1d8d846e25335b6005cd86 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Wed, 19 Nov 2025 14:39:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(form):=20=E8=A1=A8=E6=A0=BC=E6=8B=96?= =?UTF-8?q?=E5=8A=A8=E6=94=AF=E6=8C=81tdesign?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/form/src/table/useSortable.ts | 2 +- packages/form/src/utils/form.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/form/src/table/useSortable.ts b/packages/form/src/table/useSortable.ts index 10aa5761..90b979be 100644 --- a/packages/form/src/table/useSortable.ts +++ b/packages/form/src/table/useSortable.ts @@ -20,7 +20,7 @@ export const useSortable = ( const rowDrop = () => { sortable?.destroy(); const tableEl = tMagicTableRef.value?.getEl(); - const tBodyEl = tableEl?.querySelector('.el-table__body > tbody'); + const tBodyEl = tableEl?.querySelector('.el-table__body > tbody') || tableEl?.querySelector('.t-table__body'); if (!tBodyEl) { return; } diff --git a/packages/form/src/utils/form.ts b/packages/form/src/utils/form.ts index f49263cb..8836e80b 100644 --- a/packages/form/src/utils/form.ts +++ b/packages/form/src/utils/form.ts @@ -341,7 +341,7 @@ export const sortArray = (data: any[], newIndex: number, oldIndex: number, sortK } } - return newData; + return cloneDeep(newData); }; export const sortChange = (data: any[], { prop, order }: SortProp) => {