hint in model select

This commit is contained in:
vabene1111
2025-06-11 20:51:42 +02:00
parent 612c5e6668
commit 22923b8e7e
33 changed files with 47 additions and 15 deletions

View File

@@ -126,7 +126,6 @@
</v-card>
</template>
<property-view v-model="recipe" :servings="servings" v-if="recipe.internal"></property-view>
<v-card class="mt-2">
@@ -192,7 +191,6 @@ import PropertyView from "@/components/display/PropertyView.vue";
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
const {request, release} = useWakeLock()
const isPrintMode = useMediaQuery('print')
const recipe = defineModel<Recipe>({required: true})

View File

@@ -1,7 +1,7 @@
<template>
<!-- TODO label is not showing for some reason, for now in placeholder -->
<v-input :hint="props.hint" persistent-hint :label="props.label" :hide-details="props.hideDetails">
<template #prepend v-if="$slots.prepend">
<template #prepend v-if="$slots.prepend">
<slot name="prepend"></slot>
</template>
@@ -37,21 +37,24 @@
containerActive: '',
}"
>
<template #option="{ option }" v-if="props.allowCreate">
<div class="d-flex align-center justify-space-between w-100">
<span>{{ option[itemLabel] }}</span>
<v-chip size="x-small" variant="flat" color="create" class="ml-2" v-if="option.__CREATE__">
<v-icon icon="$create"></v-icon>
<template class="d-none d-lg-block"> {{$t('Create')}}</template>
</v-chip>
</div>
</template>
<template #option="{ option }" v-if="props.allowCreate">
<div class="d-flex align-center justify-space-between w-100">
<span>{{ option[itemLabel] }}</span>
<v-chip size="x-small" variant="flat" color="create" class="ml-2" v-if="option.__CREATE__">
<v-icon icon="$create"></v-icon>
<template class="d-none d-lg-block"> {{ $t('Create') }}</template>
</v-chip>
</div>
</template>
<template #clear="{ clear }" v-if="props.canClear">
<template #clear="{ clear }" v-if="props.canClear">
<span @click="clear" aria-hidden="true" tabindex="-1" role="button" data-clear="" aria-roledescription="" class="multiselect-clear">
<span class="multiselect-clear-icon"></span>
</span>
</template>
</template>
<template #afterlist>
<span class="text-disabled font-italic text-caption ms-3">{{$t('ModelSelectResultsHelp')}}</span>
</template>
</Multiselect>
<template #append v-if="$slots.append">
@@ -140,7 +143,7 @@ onBeforeMount(() => {
*/
function search(query: string) {
loading.value = true
return modelClass.value.list({query: query, page: 1, pageSize: 25}).then((r: any) => {
return modelClass.value.list({query: query, page: 1, pageSize: props.limit}).then((r: any) => {
if (modelClass.value.model.isPaginated) {
return r.results
} else {