From 7830dfc166e1d608622e6b070ec74dc9a9e53294 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Wed, 13 Nov 2024 19:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=AE=BE=E7=BD=AE=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HColSet/components/tableColDrag.vue | 3 ++- src/components/Table/src/BasicTable.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/HColSet/components/tableColDrag.vue b/src/components/HColSet/components/tableColDrag.vue index 142f169e..8bd2251f 100644 --- a/src/components/HColSet/components/tableColDrag.vue +++ b/src/components/HColSet/components/tableColDrag.vue @@ -145,7 +145,8 @@ const src = newItems.indexOf(dragging) // 拖动结束时候的节点下标 const dst = newItems.indexOf(ending) - newItems.splice(src, 1, ...newItems.splice(dst, 1, newItems[src])) + newItems.splice(src, 1) + newItems.splice(dst, 0, dragging) colData.value = newItems } const getColList = () => { diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue index 31e33e54..8ac8cb9f 100644 --- a/src/components/Table/src/BasicTable.vue +++ b/src/components/Table/src/BasicTable.vue @@ -37,7 +37,7 @@ :height="tableHeightRef + 35" :row-config="{ isCurrent: true, isHover: true }" :column-config="{ resizable: true }" - :scroll-y="{ enabled: true, gt: 0 }" + :scroll-y="{ enabled: true, gt: 0, scrollToTopOnChange: true }" :scroll-x="{ enabled: true, gt: 0 }" :sort-config="{ trigger: 'cell', remote: true }" rowSelection