forked from verdnatura/salix-front
refs #5509 fix(FormModel): autoLoad && formInitalData
This commit is contained in:
parent
9abac4a8fb
commit
00bed4fd61
|
@ -79,9 +79,8 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
// Podemos enviarle al form la estructura de data inicial sin necesidad de fetchearla
|
||||
if ($props.formInitialData || !$props.autoLoad) {
|
||||
state.set($props.model, $props.formInitialData ?? {});
|
||||
} else {
|
||||
if ($props.autoLoad && !$props.formInitialData) {
|
||||
await fetch();
|
||||
}
|
||||
|
||||
|
|
|
@ -174,7 +174,12 @@ async function upsert() {
|
|||
@on-fetch="(data) => (userConfig = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FormModel v-if="invoiceIn" :url="`InvoiceIns/${route.params.id}`" model="invoiceIn">
|
||||
<FormModel
|
||||
v-if="invoiceIn"
|
||||
:url="`InvoiceIns/${route.params.id}`"
|
||||
model="invoiceIn"
|
||||
:auto-load="true"
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<div class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
|
|
Loading…
Reference in New Issue