fix: 解决文件保存失败一直处于加载中的问题 (#4418)

This commit is contained in:
ssongliu 2024-04-07 21:38:59 +08:00 committed by GitHub
parent f1ed051135
commit 62828c464e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,14 +197,18 @@ const quickSave = () => {
const saveContent = (closePage: boolean) => {
loading.value = true;
SaveFileContent(form.value).then(() => {
loading.value = false;
open.value = !closePage;
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
if (closePage) {
handleClose();
}
});
SaveFileContent(form.value)
.then(() => {
loading.value = false;
open.value = !closePage;
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
if (closePage) {
handleClose();
}
})
.catch(() => {
loading.value = false;
});
};
const acceptParams = (props: EditProps) => {