From 7b72d7e47642f97a917d66994a8df617fafd446c Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Mon, 6 Feb 2023 01:10:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=87=AA=E5=8A=A8=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: d706089dce852facbc461ab8d2e5cb5c37bcb2ed --- src/types/auto-imports.d.ts | 6 ++++++ src/utils/sessionStorage.ts | 22 ---------------------- 2 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 src/utils/sessionStorage.ts diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 9fd51068..7ab36ade 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -108,6 +108,7 @@ declare global { const useArrayMap: typeof import('@vueuse/core')['useArrayMap'] const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce'] const useArraySome: typeof import('@vueuse/core')['useArraySome'] + const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique'] const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue'] const useAsyncState: typeof import('@vueuse/core')['useAsyncState'] const useAttrs: typeof import('vue')['useAttrs'] @@ -190,12 +191,14 @@ declare global { const useParallax: typeof import('@vueuse/core')['useParallax'] const usePermission: typeof import('@vueuse/core')['usePermission'] const usePointer: typeof import('@vueuse/core')['usePointer'] + const usePointerLock: typeof import('@vueuse/core')['usePointerLock'] const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe'] const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme'] const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast'] const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark'] const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages'] const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion'] + const usePrevious: typeof import('@vueuse/core')['usePrevious'] const useRafFn: typeof import('@vueuse/core')['useRafFn'] const useRefHistory: typeof import('@vueuse/core')['useRefHistory'] const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver'] @@ -373,6 +376,7 @@ declare module 'vue' { readonly useArrayMap: UnwrapRef readonly useArrayReduce: UnwrapRef readonly useArraySome: UnwrapRef + readonly useArrayUnique: UnwrapRef readonly useAsyncQueue: UnwrapRef readonly useAsyncState: UnwrapRef readonly useAttrs: UnwrapRef @@ -455,12 +459,14 @@ declare module 'vue' { readonly useParallax: UnwrapRef readonly usePermission: UnwrapRef readonly usePointer: UnwrapRef + readonly usePointerLock: UnwrapRef readonly usePointerSwipe: UnwrapRef readonly usePreferredColorScheme: UnwrapRef readonly usePreferredContrast: UnwrapRef readonly usePreferredDark: UnwrapRef readonly usePreferredLanguages: UnwrapRef readonly usePreferredReducedMotion: UnwrapRef + readonly usePrevious: UnwrapRef readonly useRafFn: UnwrapRef readonly useRefHistory: UnwrapRef readonly useResizeObserver: UnwrapRef diff --git a/src/utils/sessionStorage.ts b/src/utils/sessionStorage.ts deleted file mode 100644 index fae9a210..00000000 --- a/src/utils/sessionStorage.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * window.sessionStorage 浏览器临时缓存 - */ -export const sessionStorage = { - // 设置临时缓存 - set(key: string, val: any) { - window.sessionStorage.setItem(key, JSON.stringify(val)); - }, - // 获取临时缓存 - get(key: string) { - const json: any = window.sessionStorage.getItem(key); - return JSON.parse(json); - }, - // 移除临时缓存 - remove(key: string) { - window.sessionStorage.removeItem(key); - }, - // 移除全部临时缓存 - clear() { - window.sessionStorage.clear(); - } -};