zs
2025-05-06 f1204f4d3ec3e8bcb9c9d0be9c88fbe34e95b36c
PipeLineLems/web/src/utils/storage.ts
@@ -41,8 +41,13 @@
  // 获取临时缓存
  get(key: string) {
    const value: null | string = window.sessionStorage.getItem(key)
    if (!value) return null
    return JSON.parse(value)
    try {
      if (!value) return null
      return JSON.parse(value)
    } catch (error) {
      return value
    }
  },
  // 移除临时缓存
  remove(key: string) {
@@ -54,7 +59,4 @@
  },
}
export {
  Local,
  Session
}
export { Local, Session }