提交 93cb503d 编写于 作者: W wangxiyue

IssueNo:#I6FXZM:preference的使用方法

Description: preferences&storage 接口描述修改
Sig:SIG_PRINT
Feature or Bugfix: Feature
Binary Source: No
Signed-off-by: Nwangxiyue <wangxiyue8@huawei.com>
上级 54e7c90f
...@@ -363,7 +363,7 @@ context.getFilesDir().then((filePath) => { ...@@ -363,7 +363,7 @@ context.getFilesDir().then((filePath) => {
getSync(key: string, defValue: ValueType): ValueType getSync(key: string, defValue: ValueType): ValueType
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。 获取键对应的值,如果值为null或者非默认值类型,返回默认数据defValue
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
...@@ -392,7 +392,7 @@ console.info("The value of startup is " + value); ...@@ -392,7 +392,7 @@ console.info("The value of startup is " + value);
get(key: string, defValue: ValueType, callback: AsyncCallback&lt;ValueType&gt;): void get(key: string, defValue: ValueType, callback: AsyncCallback&lt;ValueType&gt;): void
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。使用callback方式返回结果,此方法为异步方法。 获取键对应的值,如果值为null或者非默认值类型,返回默认数据defValue。使用callback方式返回结果,此方法为异步方法。
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core **系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
...@@ -421,7 +421,7 @@ storage.get('startup', 'default', function(err, value) { ...@@ -421,7 +421,7 @@ storage.get('startup', 'default', function(err, value) {
get(key: string, defValue: ValueType): Promise&lt;ValueType&gt; get(key: string, defValue: ValueType): Promise&lt;ValueType&gt;
获取键对应的值,如果值为null或者非默认值类型,返默认数据。使用Promise方式返回结果,此方法为异步方法。 获取键对应的值,如果值为null或者非默认值类型,返回默认数据defValue。使用Promise方式返回结果,此方法为异步方法。
**系统能力:** 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.
先完成此消息的编辑!
想要评论请 注册