From b68a3b27fae9f82f75b23fa8a32593cd93f9f49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 2 Dec 2022 18:49:51 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=A1=E8=AE=A1=E5=8F=B0=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E7=AD=9B=E9=80=89=E6=97=A5=E6=9C=9F=E5=82=A8?= =?UTF-8?q?=E5=AD=98=E5=88=B0localStorage=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/Audit/index.vue | 3 ++- src/views/dashboard/components/SwitchDate.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/Audit/index.vue b/src/views/dashboard/Audit/index.vue index 2acee9430..88e55085f 100644 --- a/src/views/dashboard/Audit/index.vue +++ b/src/views/dashboard/Audit/index.vue @@ -41,12 +41,13 @@ export default { }, data() { return { - days: '7' + days: localStorage.getItem('auditDays') || '7' } }, methods: { onChange(val) { this.days = val + localStorage.setItem('auditDays', val) } } } diff --git a/src/views/dashboard/components/SwitchDate.vue b/src/views/dashboard/components/SwitchDate.vue index 3fc18d093..2ed12faf4 100644 --- a/src/views/dashboard/components/SwitchDate.vue +++ b/src/views/dashboard/components/SwitchDate.vue @@ -37,7 +37,7 @@ export default { } ] return { - select: '7', + select: localStorage.getItem('auditDays') || '7', iOptions: this.options.length > 0 ? this.options : defaultOptions } },