feat: 新增预览页

This commit is contained in:
mtruning
2022-03-06 02:08:14 +08:00
parent 30361aa7ca
commit 0946d170d7
13 changed files with 172 additions and 38 deletions
+3 -2
View File
@@ -2,7 +2,7 @@
/**
* * 存储本地会话数据
* @param k 键名
* @param v 键值
* @param v 键值(无需stringiiy
* @returns RemovableRef
*/
export const setLocalStorage = <T>(k: string, v: T) => {
@@ -15,9 +15,10 @@
/**
* * 获取本地会话数据
* @param k 键名
* @returns any
*/
export const getLocalStorage: (k: string) => any = (k: string) => {
export const getLocalStorage = (k: string) => {
const item = window.localStorage.getItem(k)
try {
return item ? JSON.parse(item) : item