feat: example to use it

This commit is contained in:
Javier Segarra 2024-10-30 09:30:12 +01:00
parent ff7c280338
commit f30d80129e
1 changed files with 14 additions and 8 deletions

View File

@ -6,6 +6,7 @@ import FormModel from 'src/components/FormModel.vue';
import VnRow from 'src/components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnSelectOption from 'src/components/common/VnSelectOption.vue';
const route = useRoute();
const { t } = useI18n();
@ -49,15 +50,20 @@ const workersOptions = ref([]);
</QIcon>
</template>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption>
{{ scope.opt?.nickname }}, {{ scope.opt?.id }}
</QItemLabel>
</QItemSection>
</QItem>
<VnSelectOption
:scope="scope"
label="name"
:caption="(opt) => `${opt?.nickname}, ${opt?.id}`"
></VnSelectOption>
</template>
<!-- <QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption>
{{ scope.opt?.nickname }}, {{ scope.opt?.id }}
</QItemLabel>
</QItemSection>
</QItem> -->
</VnSelect>
</VnRow>
<VnRow>