refs #5858 feat: add catch when patch FormModel
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Javier Segarra 2023-11-21 12:50:05 +01:00
parent 222a970a26
commit 701f1e100f
1 changed files with 7 additions and 1 deletions

View File

@ -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;