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
@@ -18,7 +18,6 @@ import { usePriorityValues } from '@vben/hooks';
import {
EmptyIcon,
ListFilter,
GripVertical as LucideGripVertical,
Pin as LucidePin,
RotateCcw as LucideRotateCcw,
} from '@vben/icons';
@@ -50,7 +49,6 @@ import {
ElTableColumn,
ElTooltip,
} from 'element-plus';
import draggable from 'vuedraggable';
import { DeptSelector } from '../zq-form/dept-selector';
import { PostSelector } from '../zq-form/post-selector';
@@ -1142,19 +1140,11 @@ function getSummaryMethod(param: { columns: any[]; data: any[] }) {
</div>
<ElDivider class="!my-2" />
<ElScrollbar max-height="300px">
<draggable
v-model="columnState"
item-key="key"
handle=".drag-handle"
:animation="200"
>
<template #item="{ element }">
<div class="space-y-1">
<template v-for="element in columnState" :key="element.key">
<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
v-model="element.visible"
class="mr-2 !h-6 flex-1 truncate"
@@ -1190,7 +1180,7 @@ function getSummaryMethod(param: { columns: any[]; data: any[] }) {
</div>
</div>
</template>
</draggable>
</div>
</ElScrollbar>
</div>
</ElPopover>