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