From 1b426c59574189e7e737384b931f06c62e0dfd45 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 3 Jan 2024 16:52:35 +0800 Subject: [PATCH] fix bug --- src/pages/dashboard.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/dashboard.vue b/src/pages/dashboard.vue index 61e4a5588..0e8874622 100644 --- a/src/pages/dashboard.vue +++ b/src/pages/dashboard.vue @@ -38,12 +38,12 @@ const default_config = { latest: false, } const config = ref(JSON.parse(localStorage.getItem('MP_DASHBOARD') || '{}')) -if (!config.value) { +if (Object.keys(config.value).length === 0) { config.value = default_config localStorage.setItem('MP_DASHBOARD', JSON.stringify(config.value)) } -// 弹窗设置项目 +// 设置项目 function setDashboardConfig() { localStorage.setItem('MP_DASHBOARD', JSON.stringify(config.value)) dialog.value = false