刘洋 2 жил өмнө
parent
commit
761ee912de

+ 2 - 2
src/plugins/storage.ts

@@ -21,7 +21,7 @@ class StorageTool<T extends StorageType = 'local'> {
     this.keyMap = this.storageType === 'local' ? LOCAL_STORAGE_KEYS : SESSION_STORAGE_KEYS
   }
 
-  get<D = any>(storageKey: StorageKey<T>): D | null {
+  get<D = any>(storageKey: any): D | null {
     const key = this.keyMap[storageKey]
     const value = this.storage.getItem(key)
     try {
@@ -43,7 +43,7 @@ class StorageTool<T extends StorageType = 'local'> {
     }
   }
 
-  set(storageKey: StorageKey<T>, data: unknown, option?: { expires: string | Date }) {
+  set(storageKey: any, data: unknown, option?: { expires: string | Date }) {
     const key = this.keyMap[storageKey]
     let cache: string | Date = ''
     if (option?.expires) {