Skip to content

Commit 358c554

Browse files
committed
✨ 优化存储源列表在移动端容易误触拖动的问题,在移动端增加 300 耗秒延迟,使得可以长按拖动。
1 parent 86c477a commit 358c554

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/composables/admin/storage/storage-list.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import {
88
} from "~/api/admin-storage";
99
import Sortable from "sortablejs";
1010

11+
import useCommon from "~/composables/useCommon";
12+
const { isMobile } = useCommon();
13+
1114
let cacheManageVisible = ref(false);
1215
let currentCacheManageId = ref();
1316

@@ -128,6 +131,7 @@ export default function useStorageList(router) {
128131
Sortable.create(el, {
129132
draggable: '.storage-item',
130133
filter: '.add-storage-btn',
134+
delay: isMobile.value ? 300 : 0,
131135
onEnd: e => {
132136
if (e.oldIndex === e.newIndex) {
133137
return;

0 commit comments

Comments
 (0)