Feature: add interval for sync setting

This commit is contained in:
萌萌哒赫萝
2023-05-02 12:03:21 +08:00
parent ab4e31f62a
commit 7150bf381c
7 changed files with 53 additions and 19 deletions

View File

@@ -1,10 +1,7 @@
class LS {
get (name: string) {
if (localStorage.getItem(name)) {
return JSON.parse(localStorage.getItem(name) as string)
} else {
return {}
}
const item = localStorage.getItem(name) as string
return item ? JSON.parse(item) : {}
}
set (name: string, value: any) {