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