This commit is contained in:
parent
9d77c12b1d
commit
7a7dc0db00
@ -97,7 +97,6 @@ function addToCartBtn() {
|
|||||||
|
|
||||||
.product-description {
|
.product-description {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 335px;
|
|
||||||
padding: 30px 30px 0;
|
padding: 30px 30px 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -112,7 +111,7 @@ function addToCartBtn() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@include mobile {
|
@include mobile {
|
||||||
padding: 0 10px;
|
padding: 20px 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__sizes {
|
&__sizes {
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
v-if="isMobile"
|
v-if="isMobile"
|
||||||
v-model:open="open"
|
v-model:open="open"
|
||||||
class="product__drawer"
|
class="product__drawer"
|
||||||
|
fixed
|
||||||
:ui="{
|
:ui="{
|
||||||
content: 'fixed bg-default ring ring-default flex focus:outline-none overflow-hidden',
|
content: 'fixed bg-default ring ring-default flex focus:outline-none overflow-hidden',
|
||||||
container: 'w-full flex flex-col gap-4 p-4 overflow-hidden',
|
container: 'w-full flex flex-col gap-4 p-4 overflow-hidden',
|
||||||
@ -37,30 +38,9 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<!-- <div ref="targetDrawer" class="flex flex-col gap-10" style="overflow-y: auto;"> -->
|
<div ref="targetDrawer" style="overflow-y: auto;">
|
||||||
<!-- <h1>BABAB</h1> -->
|
<ProductDescription />
|
||||||
<!-- <h1>BABAB</h1> -->
|
</div>
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- <h1>BABAB</h1> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
|
|
||||||
<ProductDescription ref="targetDrawer" style="overflow-y: auto;" />
|
|
||||||
</template>
|
</template>
|
||||||
</UDrawer>
|
</UDrawer>
|
||||||
|
|
||||||
@ -91,6 +71,7 @@ const { lengthY } = useSwipe(
|
|||||||
{
|
{
|
||||||
passive: false,
|
passive: false,
|
||||||
onSwipeEnd(e: TouchEvent, direction: UseSwipeDirection) {
|
onSwipeEnd(e: TouchEvent, direction: UseSwipeDirection) {
|
||||||
|
console.log('target.value', target.value)
|
||||||
if (lengthY.value > 50 && targetHeight.value && (Math.abs(lengthY.value) / targetHeight.value) >= 0.25) {
|
if (lengthY.value > 50 && targetHeight.value && (Math.abs(lengthY.value) / targetHeight.value) >= 0.25) {
|
||||||
open.value = true
|
open.value = true
|
||||||
}
|
}
|
||||||
@ -103,11 +84,7 @@ const { lengthY: drawerLengthY } = useSwipe(
|
|||||||
{
|
{
|
||||||
passive: false,
|
passive: false,
|
||||||
onSwipeEnd(e: TouchEvent, direction: UseSwipeDirection) {
|
onSwipeEnd(e: TouchEvent, direction: UseSwipeDirection) {
|
||||||
console.log('drawerLengthY.value', drawerLengthY.value)
|
console.log('targetDrawer.value', targetDrawer.value)
|
||||||
console.log('y', y.value)
|
|
||||||
console.log('targetDrawerHeight.value', targetDrawerHeight.value)
|
|
||||||
console.log('Math.abs(drawerLengthY.value)', Math.abs(drawerLengthY.value))
|
|
||||||
console.log('Math.abs(drawerLengthY.value) / targetDrawerHeight.value', Math.abs(drawerLengthY.value) / targetDrawerHeight.value)
|
|
||||||
if (drawerLengthY.value < 0 && y.value === 0 && targetDrawerHeight.value && (Math.abs(drawerLengthY.value) / targetDrawerHeight.value) >= 0.2) {
|
if (drawerLengthY.value < 0 && y.value === 0 && targetDrawerHeight.value && (Math.abs(drawerLengthY.value) / targetDrawerHeight.value) >= 0.2) {
|
||||||
open.value = false
|
open.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user