feat: รับ defineProps data

This commit is contained in:
Net 2024-06-07 18:03:42 +07:00
parent 50ed9559f4
commit d954a6cd71

View file

@ -1,6 +1,8 @@
<script setup lang="ts">
import AppBox from './app/AppBox.vue';
import { CustomerBranch } from 'stores/customer/types';
withDefaults(
defineProps<{
noDetail?: boolean;
@ -19,6 +21,7 @@ withDefaults(
code: string;
detail?: { label: string; value: string }[];
};
badge?: CustomerBranch[];
}>(),
{
width: '300px',
@ -215,12 +218,14 @@ defineEmits<{
>
<q-card-section class="q-pa-md">
<div
v-for="v in [1, 2]"
:key="v"
v-for="(v, i) in badge"
:key="v.id"
class="bordered row q-pa-sm q-mb-sm rounded bg-color-text-1"
>
<div class="col-2 flex flex-center">{{ v }}</div>
<div class="col-10 rounded q-pa-sm bg-color-text-2">HQ0001</div>
<div class="col-2 flex flex-center">{{ i + 1 }}</div>
<div class="col-10 rounded q-pa-sm bg-color-text-2">
{{ v.branchNo }}
</div>
</div>
</q-card-section>
</q-scroll-area>