新增加本地存储方法

This commit is contained in:
不做码农 2022-05-06 15:55:38 +08:00
parent d8b3c45e3f
commit 123a8fb57c

View File

@ -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)
}
}