Skip to content

Latest commit

 

History

History
99 lines (68 loc) · 2.43 KB

storage.md

File metadata and controls

99 lines (68 loc) · 2.43 KB

存储相关

目录

♥ getStorage(day: number)

  localStorage获取值

形参列表:
参数 类型 默认值 描述
key string 存储的键
[day] number 有效天数

♥ setStorage(day: number)

  localStorage设置值

形参列表:
参数 类型 默认值 描述
key string 存储的键
value any 存储的值
[day] number 有效天数

♥ removeStorage(key: string)

  localStorage移除键为key的存储

形参列表:
参数 类型 默认值 描述
key string 存储的键

♥ clearStorage()

  localStorage清空存储


♥ setCookie(domain: string)

  设置Cookie

形参列表:
参数 类型 默认值 描述
key string 存储的键
value any 存储的值
[expiredays] number 有效天数
[domain] string 共享Cookie域名

♥ getCookie(key: Any)

  获取Cookie

形参列表:
参数 类型 默认值 描述
key Any

♥ removeCookie(domain: string)

  清除Cookie

形参列表:
参数 类型 默认值 描述
key string 存储的键
[domain] string 共享Cookie域名