feat: show search item

This commit is contained in:
oat_dev 2024-06-13 11:26:26 +07:00
parent 405e1bb267
commit 4471b47c67

View file

@ -79,7 +79,7 @@ const formData = ref<ProductCreate>({
const currentId = ref<string>('');
const currentIdType = ref<string>('');
const resultSearchGroup = ref<Product[]>();
const resultSearchType = ref<Product>();
const resultSearchType = ref<Product[]>();
async function searchGroup() {
const resultList = await fetchListProductService({
@ -384,10 +384,12 @@ onMounted(async () => {
<div class="row q-col-gutter-lg">
<div
:class="`${$q.screen.gt.sm ? 'col-3' : $q.screen.gt.xs ? 'col-6' : 'col-12'}`"
v-for="(v, i) in productMode === 'type'
? productType
: !!inputSearch
v-for="(v, i) in !!inputSearch
? productMode === 'group'
? resultSearchGroup
: resultSearchType
: productMode === 'type'
? productType
: productGroup"
:key="i"
>