Fix defineOgImageComponent, remove swipe actions in reader mode, change onClick to addEventListener
This commit is contained in:
+6
-4
@@ -11,6 +11,8 @@ const { pages, reader } = storeToRefs(usePageStore())
|
||||
const swipe = useSwipe(card, {
|
||||
passive: true,
|
||||
onSwipeEnd: (_touch: TouchEvent, _direction: UseSwipeDirection) => {
|
||||
if (reader.value) return
|
||||
|
||||
const currentPage = pages.value.find(
|
||||
(page) => page.path === route.fullPath,
|
||||
)!
|
||||
@@ -38,10 +40,10 @@ const swipe = useSwipe(card, {
|
||||
const animationComplete = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
if (card.value)
|
||||
card.value.addEventListener('animationend', () => {
|
||||
animationComplete.value = true
|
||||
})
|
||||
card.value?.addEventListener(
|
||||
'animationend',
|
||||
() => (animationComplete.value = true),
|
||||
)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user