From e614e973127c69d903638db3e90dd75f22e289f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Wed, 12 Feb 2025 03:02:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E6=97=A0=E6=B3=95=E5=8A=A0=E8=BD=BD=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/common/CodeEditor.vue | 8 ++++---- web/src/main.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/components/common/CodeEditor.vue b/web/src/components/common/CodeEditor.vue index 622e4c2b..3e395132 100644 --- a/web/src/components/common/CodeEditor.vue +++ b/web/src/components/common/CodeEditor.vue @@ -16,12 +16,12 @@ const props = defineProps({ }) const disabled = ref(false) // 在出现错误的情况下禁用保存 -const data = ref('') +const content = ref('') const get = () => { useRequest(file.content(props.path)) .onSuccess(({ data }) => { - data.value = decodeBase64(data.content) + content.value = decodeBase64(data.content) window.$message.success('获取成功') }) .onError(() => { @@ -34,7 +34,7 @@ const save = () => { window.$message.error('当前状态下不可保存') return } - useRequest(file.save(props.path, data.value)).onSuccess(() => { + useRequest(file.save(props.path, content.value)).onSuccess(() => { window.$message.success('保存成功') }) } @@ -51,7 +51,7 @@ defineExpose({