chore: remove table drag dependency

This commit is contained in:
2026-06-11 09:36:25 +08:00
parent 700ef9ab9f
commit a4f40b1125
3 changed files with 5 additions and 34 deletions
+1 -2
View File
@@ -53,8 +53,7 @@
"grid-layout-plus": "1.1.1", "grid-layout-plus": "1.1.1",
"pinia": "catalog:", "pinia": "catalog:",
"vue": "catalog:", "vue": "catalog:",
"vue-router": "catalog:", "vue-router": "catalog:"
"vuedraggable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-basic-ssl": "^2.1.0", "@vitejs/plugin-basic-ssl": "^2.1.0",
@@ -18,7 +18,6 @@ import { usePriorityValues } from '@vben/hooks';
import { import {
EmptyIcon, EmptyIcon,
ListFilter, ListFilter,
GripVertical as LucideGripVertical,
Pin as LucidePin, Pin as LucidePin,
RotateCcw as LucideRotateCcw, RotateCcw as LucideRotateCcw,
} from '@vben/icons'; } from '@vben/icons';
@@ -50,7 +49,6 @@ import {
ElTableColumn, ElTableColumn,
ElTooltip, ElTooltip,
} from 'element-plus'; } from 'element-plus';
import draggable from 'vuedraggable';
import { DeptSelector } from '../zq-form/dept-selector'; import { DeptSelector } from '../zq-form/dept-selector';
import { PostSelector } from '../zq-form/post-selector'; import { PostSelector } from '../zq-form/post-selector';
@@ -1142,19 +1140,11 @@ function getSummaryMethod(param: { columns: any[]; data: any[] }) {
</div> </div>
<ElDivider class="!my-2" /> <ElDivider class="!my-2" />
<ElScrollbar max-height="300px"> <ElScrollbar max-height="300px">
<draggable <div class="space-y-1">
v-model="columnState" <template v-for="element in columnState" :key="element.key">
item-key="key"
handle=".drag-handle"
:animation="200"
>
<template #item="{ element }">
<div <div
class="hover:bg-accent/50 group mb-1 flex items-center rounded p-1" class="hover:bg-accent/50 group flex items-center rounded p-1"
> >
<LucideGripVertical
class="text-muted-foreground drag-handle mr-2 h-4 w-4 cursor-move opacity-0 group-hover:opacity-100"
/>
<ElCheckbox <ElCheckbox
v-model="element.visible" v-model="element.visible"
class="mr-2 !h-6 flex-1 truncate" class="mr-2 !h-6 flex-1 truncate"
@@ -1190,7 +1180,7 @@ function getSummaryMethod(param: { columns: any[]; data: any[] }) {
</div> </div>
</div> </div>
</template> </template>
</draggable> </div>
</ElScrollbar> </ElScrollbar>
</div> </div>
</ElPopover> </ElPopover>
-18
View File
@@ -728,9 +728,6 @@ importers:
vue-router: vue-router:
specifier: 'catalog:' specifier: 'catalog:'
version: 4.6.3(vue@3.5.25(typescript@5.9.3)) version: 4.6.3(vue@3.5.25(typescript@5.9.3))
vuedraggable:
specifier: ^4.1.0
version: 4.1.0(vue@3.5.25(typescript@5.9.3))
devDependencies: devDependencies:
'@vitejs/plugin-basic-ssl': '@vitejs/plugin-basic-ssl':
specifier: ^2.1.0 specifier: ^2.1.0
@@ -9430,9 +9427,6 @@ packages:
smob@1.5.0: smob@1.5.0:
resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==}
sortablejs@1.14.0:
resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
sortablejs@1.15.6: sortablejs@1.15.6:
resolution: {integrity: sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==} resolution: {integrity: sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==}
@@ -10508,11 +10502,6 @@ packages:
typescript: typescript:
optional: true optional: true
vuedraggable@4.1.0:
resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
peerDependencies:
vue: ^3.5.17
vxe-pc-ui@4.10.39: vxe-pc-ui@4.10.39:
resolution: {integrity: sha512-FvMs2A5B0CR4rlBDLsU4kZEYLixfn+1KDCOJd6p3tCSOkesZqmpkOb/KLuG+IomNHbmhFgSMkJeTVjxr6LI4tg==} resolution: {integrity: sha512-FvMs2A5B0CR4rlBDLsU4kZEYLixfn+1KDCOJd6p3tCSOkesZqmpkOb/KLuG+IomNHbmhFgSMkJeTVjxr6LI4tg==}
@@ -19329,8 +19318,6 @@ snapshots:
smob@1.5.0: {} smob@1.5.0: {}
sortablejs@1.14.0: {}
sortablejs@1.15.6: {} sortablejs@1.15.6: {}
source-map-js@1.2.1: {} source-map-js@1.2.1: {}
@@ -20687,11 +20674,6 @@ snapshots:
optionalDependencies: optionalDependencies:
typescript: 5.9.3 typescript: 5.9.3
vuedraggable@4.1.0(vue@3.5.25(typescript@5.9.3)):
dependencies:
sortablejs: 1.14.0
vue: 3.5.25(typescript@5.9.3)
vxe-pc-ui@4.10.39(vue@3.5.25(typescript@5.9.3)): vxe-pc-ui@4.10.39(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
'@vxe-ui/core': 4.2.15(vue@3.5.25(typescript@5.9.3)) '@vxe-ui/core': 4.2.15(vue@3.5.25(typescript@5.9.3))