fix: allow dragging in touc devices while reordering columns
This commit is contained in:
parent
4131b6c111
commit
c62faae5b8
@ -18,6 +18,7 @@
|
|||||||
<Draggable
|
<Draggable
|
||||||
:list="columns"
|
:list="columns"
|
||||||
@end="apply"
|
@end="apply"
|
||||||
|
:delay="isTouchScreenDevice() ? 200 : 0"
|
||||||
item-key="key"
|
item-key="key"
|
||||||
class="list-group"
|
class="list-group"
|
||||||
>
|
>
|
||||||
@ -147,6 +148,7 @@ import DragIcon from '@/components/Icons/DragIcon.vue'
|
|||||||
import ReloadIcon from '@/components/Icons/ReloadIcon.vue'
|
import ReloadIcon from '@/components/Icons/ReloadIcon.vue'
|
||||||
import NestedPopover from '@/components/NestedPopover.vue'
|
import NestedPopover from '@/components/NestedPopover.vue'
|
||||||
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
||||||
|
import { isTouchScreenDevice } from '@/utils'
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { watchOnce } from '@vueuse/core'
|
import { watchOnce } from '@vueuse/core'
|
||||||
|
|||||||
@ -212,3 +212,7 @@ export function isEmoji(str) {
|
|||||||
const emojiList = gemoji.map((emoji) => emoji.emoji)
|
const emojiList = gemoji.map((emoji) => emoji.emoji)
|
||||||
return emojiList.includes(str)
|
return emojiList.includes(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isTouchScreenDevice() {
|
||||||
|
return "ontouchstart" in document.documentElement;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user