2024-06-10 17:42:37 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import AppBox from 'components/app/AppBox.vue';
|
|
|
|
|
import { onMounted } from 'vue';
|
|
|
|
|
|
|
|
|
|
withDefaults(
|
|
|
|
|
defineProps<{
|
|
|
|
|
label: string;
|
|
|
|
|
color?: string;
|
|
|
|
|
isType?: boolean;
|
|
|
|
|
}>(),
|
|
|
|
|
{
|
|
|
|
|
color: 'var(--brand-1)',
|
|
|
|
|
isType: false,
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div
|
|
|
|
|
class="q-pa-lg full-width rounded column items-center hover-card"
|
2024-06-11 09:38:05 +07:00
|
|
|
:style="`border:2px dashed ${isType ? 'var(--purple-11)' : 'var(--pink-6)'};flex-grow:1`"
|
2024-06-11 12:00:15 +07:00
|
|
|
@click="$emit('onClick')"
|
2024-06-10 17:42:37 +07:00
|
|
|
>
|
|
|
|
|
<q-img
|
|
|
|
|
style="height: 140px; max-width: 170px"
|
|
|
|
|
:src="isType ? 'product-type.png' : 'product-group.png'"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
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)'}`"
|
|
|
|
|
>
|
2024-06-11 09:38:05 +07:00
|
|
|
<div class="text-white text-no-wrap">+ {{ $t(label) }}</div>
|
2024-06-10 17:42:37 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.hover-card:hover {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
opacity: 0.8;
|
2024-06-11 12:00:15 +07:00
|
|
|
box-shadow: var(--shadow-3);
|
2024-06-10 17:42:37 +07:00
|
|
|
}
|
|
|
|
|
</style>
|