From 4cc95c4f8f0d32fdc504a9b84be8640fef354bb1 Mon Sep 17 00:00:00 2001 From: lyt-Top <1105290566@qq.com> Date: Thu, 27 May 2021 21:26:45 +0800 Subject: [PATCH] =?UTF-8?q?'admin-21.05.27:=E6=96=B0=E5=A2=9Eutils?= =?UTF-8?q?=E4=B8=8B=E7=9A=84storage.js=E8=AF=BB=E5=8F=96=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E7=BC=93=E5=AD=98=E6=96=B0=E5=86=99=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=BB=BA=E8=AE=AE=E4=BD=BF=E7=94=A8'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/storage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/storage.ts b/src/utils/storage.ts index e670ee7..c5c4f18 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -37,7 +37,7 @@ export function clearSession() { } // 新写法,简单易记,建议使用 -// 1、window.localStorage 浏览器永久缓存 +// 1、window.localStorage 浏览器永久缓存 export const Local = { // 设置永久缓存 set(key: string, val: any) { @@ -70,7 +70,7 @@ export const Session = { return JSON.parse(json); }, // 移除临时缓存 - removeLocal(key: string) { + remove(key: string) { window.sessionStorage.removeItem(key); }, // 移除全部临时缓存