主题
useSessionStorage
反应式 SessionStorage。
¥Reactive SessionStorage.
用法
¥Usage
请参阅 useStorage
¥Please refer to useStorage
类型声明
typescript
export declare function useSessionStorage(
key: string,
initialValue: MaybeRefOrGetter<string>,
options?: UseStorageOptions<string>,
): RemovableRef<string>
export declare function useSessionStorage(
key: string,
initialValue: MaybeRefOrGetter<boolean>,
options?: UseStorageOptions<boolean>,
): RemovableRef<boolean>
export declare function useSessionStorage(
key: string,
initialValue: MaybeRefOrGetter<number>,
options?: UseStorageOptions<number>,
): RemovableRef<number>
export declare function useSessionStorage<T>(
key: string,
initialValue: MaybeRefOrGetter<T>,
options?: UseStorageOptions<T>,
): RemovableRef<T>
export declare function useSessionStorage<T = unknown>(
key: string,
initialValue: MaybeRefOrGetter<null>,
options?: UseStorageOptions<T>,
): RemovableRef<T>