feat: responsive card + fix height card

This commit is contained in:
oat_dev 2024-06-11 09:38:05 +07:00
parent 43d0caca67
commit 6add0cc327
2 changed files with 10 additions and 4 deletions

View file

@ -18,7 +18,7 @@ withDefaults(
<template>
<div
class="q-pa-lg full-width rounded column items-center hover-card"
:style="`border:2px dashed ${isType ? 'var(--purple-11)' : 'var(--pink-6)'}`"
:style="`border:2px dashed ${isType ? 'var(--purple-11)' : 'var(--pink-6)'};flex-grow:1`"
@click="console.log('clicked!')"
>
<q-img
@ -30,7 +30,7 @@ withDefaults(
class="items-center rounded q-px-lg q-mt-md"
:style="`border:1px solid ${isType ? 'var(--purple-11)' : 'var(--pink-6)'};background-color: ${isType ? 'var(--purple-11)' : 'var(--pink-6)'}`"
>
<div class="text-white">+ {{ $t(label) }}</div>
<div class="text-white text-no-wrap">+ {{ $t(label) }}</div>
</div>
</div>
</template>

View file

@ -86,7 +86,11 @@ const inputSearch = ref<string>('');
</div>
</div>
<div class="row q-col-gutter-lg">
<div class="col-3" v-for="i in 6" :key="i">
<div
:class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
v-for="i in 6"
:key="i"
>
<ProductCardComponent
:title="cardData.title"
:subtitle="cardData.subtitle"
@ -95,7 +99,9 @@ const inputSearch = ref<string>('');
:color="cardData.color"
/>
</div>
<div class="col-3">
<div
:class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
>
<NewProductCardCompoent
:label="'กลุ่มสินค้าและบริการ'"
:isType="false"