Any mc.getStorageSync(String key)
mc.getStorage 的同步版本
参数
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| key | String | 是 | 本地缓存中指定的 key |
返回值
| 类型 | 说明 |
|---|---|
| Any | key对应的内容 |
key对应的内容
示例代码:
console.log(mc.getStorageSync('key'));
Press ← or → to navigate between chapters
Press ? to show this help
Press Esc to hide this help
mc.getStorage 的同步版本
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| key | String | 是 | 本地缓存中指定的 key |
| 类型 | 说明 |
|---|---|
| Any | key对应的内容 |
key对应的内容
示例代码:
console.log(mc.getStorageSync('key'));