|
|
@@ -1,4 +1,4 @@
|
|
|
-<!--suppress VueUnrecognizedSlot -->
|
|
|
+<!--suppress VueUnrecognizedSlot, JSUnresolvedReference -->
|
|
|
<template>
|
|
|
<Card class="mx-auto max-w-prose">
|
|
|
<template #content>
|
|
|
@@ -23,7 +23,7 @@
|
|
|
@inactive="validate(field)"
|
|
|
>
|
|
|
<template #inactive>
|
|
|
- <div class="ml-1 block text-sm text-primary dark:text-primary">
|
|
|
+ <div class="ml-1 text-sm text-primary dark:text-primary">
|
|
|
{{ _startCase(field) }}
|
|
|
</div>
|
|
|
|
|
|
@@ -46,7 +46,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template #active="{ deactivate }">
|
|
|
- <div class="ml-1 block text-sm text-primary dark:text-primary">
|
|
|
+ <div class="ml-1 text-sm text-primary dark:text-primary">
|
|
|
{{ _startCase(field) }}
|
|
|
</div>
|
|
|
|
|
|
@@ -73,12 +73,20 @@
|
|
|
<ComboBox
|
|
|
v-else-if="type === 'autocomplete'"
|
|
|
v-model="model[field]"
|
|
|
- :tabindex="0"
|
|
|
:inputId="field"
|
|
|
+ :tabindex="0"
|
|
|
:suggestions="suggestions?.[field]"
|
|
|
@blur="waitForAnimation(deactivate)"
|
|
|
/>
|
|
|
|
|
|
+ <PasswordField
|
|
|
+ v-else-if="type === 'password'"
|
|
|
+ v-model="model[field]"
|
|
|
+ :inputId="field"
|
|
|
+ :tabindex="0"
|
|
|
+ @blur="waitForAnimation(deactivate)"
|
|
|
+ />
|
|
|
+
|
|
|
<InputText
|
|
|
v-else
|
|
|
v-model="model[field]"
|
|
|
@@ -151,7 +159,7 @@ const props = defineProps({
|
|
|
},
|
|
|
|
|
|
modelId: {
|
|
|
- type: [String, Number],
|
|
|
+ type: String,
|
|
|
required: false,
|
|
|
validator: (value, props) => props.action === "create" || isPresent(value)
|
|
|
},
|
|
|
@@ -217,6 +225,7 @@ onBeforeRouteLeave(async () => {
|
|
|
async function focusFormControl(field, type) {
|
|
|
await nextTick()
|
|
|
const control = document.getElementById(field)
|
|
|
+ // noinspection JSUnresolvedReference
|
|
|
control.focus()
|
|
|
|
|
|
switch (type) {
|