qsh 4 months ago
parent e5418f4019
commit a2adf2ce20
  1. 4
      src/plugins/cache/index.js

@ -26,7 +26,7 @@ const sessionCache = {
let storage = storageStr ? JSON.parse(storageStr) : {} let storage = storageStr ? JSON.parse(storageStr) : {}
return storage[key] return storage[key]
}, },
remove(key) { delete(key) {
if (!sessionStorage) { if (!sessionStorage) {
return null return null
} }
@ -62,7 +62,7 @@ const localCache = {
let storage = storageStr ? JSON.parse(storageStr) : {} let storage = storageStr ? JSON.parse(storageStr) : {}
return storage[key] return storage[key]
}, },
remove(key) { delete(key) {
if (!localStorage) { if (!localStorage) {
return null return null
} }

Loading…
Cancel
Save