cookie
本地存储
- getCookie
- setCookie
- removeCookie
setCookie
Section titled “setCookie”| 属性名 | 说明 | 类型 | 必填 | 默认值 |
|---|---|---|---|---|
| name | 名称 | String | ✅ | - |
| value | 索引 | * | ✅ | - |
| options | 配置项 | Object | ❌ | - |
| options.expires | 过期时间 | Number | ❌ | - |
| options.path | 路径 | String | ❌ | - |
| options.domain | 域名 | String | ❌ | - |
| options.secure | 安全性 | String | ❌ | - |
| options.sameSite | 安全性 | Strict | Lax | None | ❌ | - |
getCookie
Section titled “getCookie”| 属性名 | 说明 | 类型 | 必填 | 默认值 |
|---|---|---|---|---|
| name | 名称 | String | ✅ | - |
removeCookie
Section titled “removeCookie”| 属性名 | 说明 | 类型 | 必填 | 默认值 |
|---|---|---|---|---|
| name | 名称 | String | ✅ | - |
| path | 路径 | String | ❌ | - |
返回值