|
@@ -25,7 +25,7 @@
|
|
|
:animation="200"
|
|
:animation="200"
|
|
|
:scroll="true"
|
|
:scroll="true"
|
|
|
:scrollSensitivity="50"
|
|
:scrollSensitivity="50"
|
|
|
- :disabled="true"
|
|
|
|
|
|
|
+ :disabled="isMobileDevice || editingSectionId"
|
|
|
@end="handleDragEnd"
|
|
@end="handleDragEnd"
|
|
|
itemKey="id"
|
|
itemKey="id"
|
|
|
>
|
|
>
|
|
@@ -86,12 +86,17 @@ import useLoadSlides from '@/hooks/useLoadSlides'
|
|
|
import useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'
|
|
import useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'
|
|
|
import type { Slide } from '@/types/slides'
|
|
import type { Slide } from '@/types/slides'
|
|
|
import { lang } from '@/main'
|
|
import { lang } from '@/main'
|
|
|
-
|
|
|
|
|
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
|
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
|
|
import Templates from './Templates.vue'
|
|
import Templates from './Templates.vue'
|
|
|
import Popover from '@/components/Popover.vue'
|
|
import Popover from '@/components/Popover.vue'
|
|
|
import Draggable from 'vuedraggable'
|
|
import Draggable from 'vuedraggable'
|
|
|
|
|
|
|
|
|
|
+// 检测是否为移动设备(包括iPad和手机)
|
|
|
|
|
+const isMobileDevice = computed(() => {
|
|
|
|
|
+ const userAgent = navigator.userAgent
|
|
|
|
|
+ return /iPhone|iPad|iPod|Android|Mobile/.test(userAgent) || (navigator.maxTouchPoints > 1 && /Macintosh/.test(userAgent))
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const mainStore = useMainStore()
|
|
const mainStore = useMainStore()
|
|
|
const slidesStore = useSlidesStore()
|
|
const slidesStore = useSlidesStore()
|
|
|
const keyboardStore = useKeyboardStore()
|
|
const keyboardStore = useKeyboardStore()
|