This commit is contained in:
parent
66dd08cf65
commit
5416df0c2c
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div ref="target" class="product">
|
||||
<UDrawer
|
||||
v-if="isMobile"
|
||||
v-model:open="open"
|
||||
title="Drawer with title"
|
||||
:class="{ animated: !isSwiping }"
|
||||
:style="{ top }"
|
||||
>
|
||||
@ -12,14 +12,18 @@
|
||||
<ProductDescription />
|
||||
</template>
|
||||
</UDrawer>
|
||||
|
||||
<ProductImages v-if="!isMobile" />
|
||||
<ProductDescription v-if="!isMobile" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { UseSwipeDirection } from '@vueuse/core'
|
||||
import { useSwipe } from '@vueuse/core'
|
||||
import { useMediaQuery, useSwipe } from '@vueuse/core'
|
||||
import { computed, shallowRef } from 'vue'
|
||||
|
||||
const isMobile = useMediaQuery('(max-width: 1280px)')
|
||||
const open = ref(false)
|
||||
const target = shallowRef<HTMLElement | null>(null)
|
||||
const targetHeight = computed(() => target.value?.offsetHeight)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user