From cdf16277ff85cee5029de3b7ea78b14bc0274623 Mon Sep 17 00:00:00 2001 From: Sun <95302870@qq.com> Date: Sat, 6 Jan 2024 12:41:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deskModule/SystemMonitor/common.ts | 3 +- .../deskModule/SystemMonitor/index.vue | 96 +++++++++++++++++-- 2 files changed, 88 insertions(+), 11 deletions(-) diff --git a/src/components/deskModule/SystemMonitor/common.ts b/src/components/deskModule/SystemMonitor/common.ts index f5b55d9..0df0cd4 100644 --- a/src/components/deskModule/SystemMonitor/common.ts +++ b/src/components/deskModule/SystemMonitor/common.ts @@ -77,10 +77,11 @@ export async function deleteByIndex(index: number): Promise { const data = await getAll() if (data[index]) data.splice(index, 1) - saveAll(data) + await saveAll(data) } catch (error) { success = false + console.error(error) } return success diff --git a/src/components/deskModule/SystemMonitor/index.vue b/src/components/deskModule/SystemMonitor/index.vue index 4553b98..22e055f 100644 --- a/src/components/deskModule/SystemMonitor/index.vue +++ b/src/components/deskModule/SystemMonitor/index.vue @@ -1,14 +1,13 @@