optimize(components): accuracy draggable area for TableColumnSetting with animation (#465)

This commit is contained in:
KC 2024-06-01 16:45:25 +02:00 committed by GitHub
parent 3ad438984e
commit 2aa85c6f93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,10 +21,10 @@ const columns = defineModel<NaiveUI.TableColumnCheck[]>('columns', {
{{ $t('common.columnSetting') }}
</NButton>
</template>
<VueDraggable v-model="columns">
<VueDraggable v-model="columns" :animation="150" filter=".none_draggable">
<div v-for="item in columns" :key="item.key" class="h-36px flex-y-center rd-4px hover:(bg-primary bg-opacity-20)">
<icon-mdi-drag class="mr-8px cursor-move text-icon" />
<NCheckbox v-model:checked="item.checked">
<icon-mdi-drag class="mr-8px h-full cursor-move text-icon" />
<NCheckbox v-model:checked="item.checked" class="none_draggable flex-1">
{{ item.title }}
</NCheckbox>
</div>