mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-11-29 22:12:11 +08:00
feat(form): 表格拖动支持tdesign
This commit is contained in:
parent
97affb2bff
commit
e2708b868b
@ -20,7 +20,7 @@ export const useSortable = (
|
|||||||
const rowDrop = () => {
|
const rowDrop = () => {
|
||||||
sortable?.destroy();
|
sortable?.destroy();
|
||||||
const tableEl = tMagicTableRef.value?.getEl();
|
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) {
|
if (!tBodyEl) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) => {
|
export const sortChange = (data: any[], { prop, order }: SortProp) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user