forked from verdnatura/salix-front
refs #5858 feat: add catch when patch FormModel
This commit is contained in:
parent
222a970a26
commit
701f1e100f
|
@ -80,7 +80,13 @@ async function save() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
|
try {
|
||||||
await axios.patch($props.urlUpdate || $props.url, formData.value);
|
await axios.patch($props.urlUpdate || $props.url, formData.value);
|
||||||
|
} catch (err) {
|
||||||
|
if (err) {
|
||||||
|
isLoading.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
originalData.value = JSON.parse(JSON.stringify(formData.value));
|
originalData.value = JSON.parse(JSON.stringify(formData.value));
|
||||||
hasChanges.value = false;
|
hasChanges.value = false;
|
||||||
|
|
Loading…
Reference in New Issue