mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 06:46:13 +03:00
perf(TorrentCard): Only process drag on handle (#1253)
This commit is contained in:
parent
15761d0f5d
commit
681e59f7c7
2 changed files with 3 additions and 4 deletions
|
@ -6,15 +6,14 @@ defineEmits<{ update: [value: void] }>()
|
|||
|
||||
<template>
|
||||
<tr class="table-row">
|
||||
<td><v-icon icon="mdi-drag-vertical" /></td>
|
||||
<td><v-icon icon="mdi-drag-vertical" class="dnd-handle" /></td>
|
||||
<td><v-btn density="compact" :icon="property.active ? 'mdi-checkbox-marked' : 'mdi-checkbox-blank-outline'" variant="flat" @click="$emit('update')" /></td>
|
||||
<td>{{ $t(`torrent.properties.${property.name}`) }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
tr.table-row {
|
||||
td .dnd-handle {
|
||||
cursor: move;
|
||||
margin-bottom: 12px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -32,7 +32,7 @@ function toggleActive(isBusy: boolean, property: TorrentProperty) {
|
|||
<v-list-subheader>{{ $t('settings.vuetorrent.torrentCard.busyTorrentTip') }}</v-list-subheader>
|
||||
|
||||
<v-table>
|
||||
<draggable v-model="busyTorrentProperties" item-key="name" tag="tbody">
|
||||
<draggable v-model="busyTorrentProperties" item-key="name" tag="tbody" handle=".dnd-handle">
|
||||
<template v-slot:item="{ element }">
|
||||
<DashboardItem :property="element" @update="toggleActive(true, element)" />
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue