diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-preferences.md b/zh-cn/application-dev/reference/apis/js-apis-data-preferences.md index f7a4b597b4a6602a668d526d23a6d38ee8d96e62..d9bfa5e2d38b3a99cbeaeca7ad3d9084ec824899 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-preferences.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-preferences.md @@ -22,8 +22,8 @@ import data_preferences from '@ohos.data.preferences'; | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ---------------- | -------- | ---- | ---- | --------------------------------------- | -| MAX_KEY_LENGTH | number | 是 | 否 | Key的最大长度限制,需小于80个字节。 | -| MAX_VALUE_LENGTH | number | 是 | 否 | Value的最大长度限制,需小于8192个字节。 | +| MAX_KEY_LENGTH | number | 是 | 否 | Key的最大长度限制为80个字节。 | +| MAX_VALUE_LENGTH | number | 是 | 否 | Value的最大长度限制为8192个字节。 | ## data_preferences.getPreferences @@ -1023,4 +1023,4 @@ try { | boolean | 表示值类型为布尔值。 | | Array\ | 表示值类型为数字类型的数组。 | | Array\ | 表示值类型为布尔类型的数组。 | -| Array\ | 表示值类型为字符串类型的数组。 | \ No newline at end of file +| Array\ | 表示值类型为字符串类型的数组。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-storage.md b/zh-cn/application-dev/reference/apis/js-apis-data-storage.md index 0f88e6c822949fc19e03667f8a6a07ea290e78da..02ecf783227dffe73b28db6f9a42c2b7330efc9f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-storage.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-storage.md @@ -8,7 +8,7 @@ > - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > > - 从API Version 9开始,该接口不再维护,推荐使用新接口[`@ohos.data.preferences`](js-apis-data-preferences.md)。 -> +> > - 本模块接口仅可在FA模型下使用。 @@ -24,8 +24,8 @@ import data_storage from '@ohos.data.storage'; | 名称 | 类型 | 可读 | 可写 | 说明 | | ---------------- | -------- | ---- | ---- | ------------------------------------- | -| MAX_KEY_LENGTH | number | 是 | 否 | key的最大长度限制,需小于80字节。 | -| MAX_VALUE_LENGTH | number | 是 | 否 | value的最大长度限制,需小于8192字节。 | +| MAX_KEY_LENGTH | number | 是 | 否 | key的最大长度限制为80字节。 | +| MAX_VALUE_LENGTH | number | 是 | 否 | value的最大长度限制为8192字节。 | ## data_storage.getStorageSync @@ -172,7 +172,7 @@ context.getFilesDir().then((filePath) => { console.info("======================>getFilesDirPromise====================>"); data_storage.deleteStorageSync(path + '/mystore'); -}); +}); ``` ## data_storage.deleteStorage @@ -276,9 +276,9 @@ let context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; console.info("======================>getFilesDirPromise====================>"); - + data_storage.removeStorageFromCacheSync(path + '/mystore'); -}); +}); ``` @@ -924,4 +924,4 @@ storage.off('change', observer); | ------- | -------------------- | | number | 表示值类型为数字。 | | string | 表示值类型为字符。 | -| boolean | 表示值类型为布尔值。 | \ No newline at end of file +| boolean | 表示值类型为布尔值。 |