feat: add creatable menu when no options
This commit is contained in:
parent
e0d24b49cb
commit
6a4ad4ac48
1 changed files with 31 additions and 0 deletions
|
|
@ -91,6 +91,37 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #no-option v-if="creatable">
|
||||||
|
<q-item
|
||||||
|
:disable="creatableDisabled"
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click.stop="$emit('create')"
|
||||||
|
>
|
||||||
|
<q-item-section>
|
||||||
|
<span class="row items-center">
|
||||||
|
<q-icon
|
||||||
|
name="mdi-plus-circle-outline"
|
||||||
|
class="q-mr-sm"
|
||||||
|
style="color: hsl(var(--positive-bg))"
|
||||||
|
/>
|
||||||
|
<b>
|
||||||
|
{{ $t('general.add', { text: $t('quotation.newCustomer') }) }}
|
||||||
|
</b>
|
||||||
|
<span
|
||||||
|
v-if="creatableDisabled && creatableDisabledText"
|
||||||
|
class="app-text-muted q-pl-xs"
|
||||||
|
style="font-size: 80%"
|
||||||
|
>
|
||||||
|
{{ creatableDisabledText }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
|
<q-separator class="q-mx-sm" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #before-options v-if="creatable">
|
<template #before-options v-if="creatable">
|
||||||
<q-item
|
<q-item
|
||||||
:disable="creatableDisabled"
|
:disable="creatableDisabled"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue