This commit is contained in:
Jesse-Ma
2022-06-06 10:56:12 +08:00
parent 0d10a1802a
commit 9a7d98316c
11 changed files with 392 additions and 50 deletions

View File

@@ -15,6 +15,10 @@ class Session {
return JSON.parse(sessionStorage.getItem(key));
}
delete(key){
sessionStorage.removeItem(key);
}
setText(key, value) {
sessionStorage.setItem(key, value);
}
@@ -33,6 +37,10 @@ class Local {
return JSON.parse(localStorage.getItem(key));
}
delete(key){
localStorage.removeItem(key);
}
setText(key, value) {
localStorage.setItem(key, value);
}