// 封装sessionStorage
export const setSessionStorage = (key: string, value: any) => {
  sessionStorage.setItem(key, JSON.stringify(value))
}

export const getSessionStorage = (key: string) => {
  if (sessionStorage.getItem(key) === '') {
    return ''
  }
  return JSON.parse(sessionStorage.getItem(key) as string)
}

export const removeSessionStorage = (key: string) => {
  sessionStorage.removeItem(key)
}

export const clearSessionStorage = () => {
  sessionStorage.clear()
}

