Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
80bc8614
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
80bc8614
编写于
4月 28, 2022
作者:
L
li_juntao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改system.storage文档描述
Signed-off-by:
N
li_juntao
<
lijuntao9@huawei.com
>
上级
5bcd2647
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
6 addition
and
6 deletion
+6
-6
zh-cn/application-dev/reference/apis/js-apis-system-storage.md
.../application-dev/reference/apis/js-apis-system-storage.md
+6
-6
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-system-storage.md
浏览文件 @
80bc8614
...
@@ -19,7 +19,7 @@ import storage from '@system.storage';
...
@@ -19,7 +19,7 @@ import storage from '@system.storage';
get(Object): void
get(Object): void
通过
key读取缓存中存储的value
。
通过
索引读取缓存中存储的值
。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
...
@@ -29,7 +29,7 @@ get(Object): void
...
@@ -29,7 +29,7 @@ get(Object): void
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| key | string | 是 | 内容索引。 |
| key | string | 是 | 内容索引。 |
| default | string | 否 | key不存在则返回的默认值。 |
| default | string | 否 | key不存在则返回的默认值。 |
| success | Function | 否 | 接口调用成功的回调函数,返回key对应的value。 |
| success | Function | 否 | 接口调用成功的回调函数,
data为
返回key对应的value。 |
| fail | Function | 否 | 接口调用失败的回调函数,data为错误信息,code为错误码。 |
| fail | Function | 否 | 接口调用失败的回调函数,data为错误信息,code为错误码。 |
| complete | Function | 否 | 接口调用结束的回调函数。 |
| complete | Function | 否 | 接口调用结束的回调函数。 |
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
set(Object): void
set(Object): void
修改缓存中
key对应的value
。
修改缓存中
索引对应的值
。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
...
@@ -67,7 +67,7 @@ set(Object): void
...
@@ -67,7 +67,7 @@ set(Object): void
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| key | string | 是 | 要修改的存储
内容
的索引。 |
| key | string | 是 | 要修改的存储
值
的索引。 |
| value | string | 是 | 新值。最大长度128。 |
| value | string | 是 | 新值。最大长度128。 |
| success | Function | 否 | 接口调用成功的回调函数。 |
| success | Function | 否 | 接口调用成功的回调函数。 |
| fail | Function | 否 | 接口调用失败的回调函数,data为错误信息,code为错误码。 |
| fail | Function | 否 | 接口调用失败的回调函数,data为错误信息,code为错误码。 |
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
clear(Object): void
clear(Object): void
清空缓存中存储的
key-value
键值对。
清空缓存中存储的键值对。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
delete(Object): void
delete(Object): void
删除缓存中对应的
key-value
键值对。
删除缓存中对应的键值对。
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:**
SystemCapability.DistributedDataManager.Preferences.Core
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录