From 123a8fb57cd9b709909809f4eb0a08fed8d0fdcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Fri, 6 May 2022 15:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/storage.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/utils/storage.js b/src/utils/storage.js index 7b4f758..0f0c4ee 100644 --- a/src/utils/storage.js +++ b/src/utils/storage.js @@ -13,4 +13,16 @@ export const cookie = { get(key) { Cookies.get(key) } +} + +export const local = { + set(key, data) { + return localStorage.setItem(key, data) + }, + remove(key) { + return localStorage.removeItem(key) + }, + get(key) { + return localStorage.getItem(key) + } } \ No newline at end of file