From 62828c464ecab22057180e264509b41e047ff51c Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Sun, 7 Apr 2024 21:38:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5=E4=B8=80=E7=9B=B4=E5=A4=84?= =?UTF-8?q?=E4=BA=8E=E5=8A=A0=E8=BD=BD=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#4418)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file-management/code-editor/index.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/host/file-management/code-editor/index.vue b/frontend/src/views/host/file-management/code-editor/index.vue index 6e05b3f16..6a6fafc1e 100644 --- a/frontend/src/views/host/file-management/code-editor/index.vue +++ b/frontend/src/views/host/file-management/code-editor/index.vue @@ -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) => {