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) => {