(deprecated)
> 从API version 9开始不再支持。建议使用[bundleMonitor](js-apis-bundleMonitor.md)替代。
-**系统API:** 此接口为系统接口,三方应用不支持调用。
+**系统API:** 此接口为系统接口。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework。
diff --git a/zh-cn/application-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md
index fb7cd3047e666fe09808f55857eb8e857811d8b1..841a7c9b0b786740baccc129749972f9cee567bc 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md
@@ -34,7 +34,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -62,7 +62,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -94,7 +94,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -121,7 +121,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -153,7 +153,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -179,7 +179,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -210,7 +210,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -236,7 +236,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -267,7 +267,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -293,7 +293,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-Bundle-distributedBundle.md b/zh-cn/application-dev/reference/apis/js-apis-Bundle-distributedBundle.md
index 49db882be3b123b00dbb25f8a4ee70d406d10eac..76c621f40eeb31b7c60055e90e6035f59ce5292a 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-Bundle-distributedBundle.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-Bundle-distributedBundle.md
@@ -42,7 +42,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -71,7 +71,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -103,7 +103,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -132,7 +132,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-Bundle.md b/zh-cn/application-dev/reference/apis/js-apis-Bundle.md
index 997bf8437e729f08a341ec41029e61c0e06899d3..8d2a5e8afc6db4b729e64972cede9cb5862736c2 100755
--- a/zh-cn/application-dev/reference/apis/js-apis-Bundle.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-Bundle.md
@@ -426,7 +426,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**返回值:**
@@ -462,7 +462,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -499,7 +499,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -540,7 +540,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -584,7 +584,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -626,7 +626,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -671,7 +671,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -699,7 +699,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -754,7 +754,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
@@ -794,7 +794,7 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
-此接口为系统接口,三方应用不支持调用
+此接口为系统接口。
**参数:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appRecovery.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appRecovery.md
index 8658417d06f5e70a9f87a3ae9555a6fa82a628fa..94ac177abec2771b0bda6c3f0413b97bea8f8ec8 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appRecovery.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appRecovery.md
@@ -158,6 +158,12 @@ saveAppState(context?: UIAbilityContext): boolean;
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| -------- | -------- | -------- | -------- |
+| context | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md)| 否 | UIAbility上下文环境。 |
+
**返回值:**
| 类型 | 说明 |
@@ -182,6 +188,12 @@ setRestartWant(want: Want): void;
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| -------- | -------- | -------- | -------- |
+| want | [Want](js-apis-application-want.md)| 是 | 通过设置Want中"bundleName"和"abilityName"字段来指定恢复重启的Ability。 |
+
**示例:**
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md
index bc17ac5a0e514bfc1526eb5771399029faae9a24..8e521d379da256f91114d62f06a822f01903758c 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-serviceExtensionAbility.md
@@ -148,7 +148,7 @@ Extension生命周期回调,如果是connectAbility拉起的服务,会在onC
## ServiceExtensionAbility.onDisconnect
-onDisconnect(want: Want): void | Promise;
+onDisconnect(want: Want): void | Promise\;
Extension的生命周期回调,客户端执行断开连接服务时回调。
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md
index 1c5085195ca7703e0e9cdd76bc30b8dbe47f4423..6b938dfa1c2dfa3ff782f61f09f1763280a3fc71 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md
@@ -130,11 +130,11 @@ import Want from '@ohos.app.ability.Want';
```
* 文件描述符(FD)
```ts
- import fileio from '@ohos.fileio';
+ import fs from '@ohos.file.fs';
let fd;
try {
- fd = fileio.openSync('/data/storage/el2/base/haps/pic.png');
+ fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd;
} catch(e) {
console.error('openSync fail: ${JSON.stringify(e)}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-appControl.md b/zh-cn/application-dev/reference/apis/js-apis-appControl.md
index b9747a0dc7acfb4eaab24f6bd575de660208f660..03286aaa8a0cabe11779d0755aefe5802dbf2eb3 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-appControl.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-appControl.md
@@ -24,7 +24,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\
**系统能力:** SystemCapability.BundleManager.BundleFramework.AppControl
-**系统API:** 此接口为系统接口,三方应用不支持调用。
+**系统API:** 此接口为系统接口。。
**参数:**
@@ -75,7 +75,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\;
**系统能力:** SystemCapability.BundleManager.BundleFramework.AppControl
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -171,7 +171,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\): void;
**系统能力:** SystemCapability.BundleManager.BundleFramework.AppControl
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -216,7 +216,7 @@ deleteDisposedStatus(appId: string): Promise\
**系统能力:** SystemCapability.BundleManager.BundleFramework.AppControl
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -265,7 +265,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\) : void
**系统能力:** SystemCapability.BundleManager.BundleFramework.AppControl
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-want.md b/zh-cn/application-dev/reference/apis/js-apis-application-want.md
index f7d00402995f666cd8eb47062b2c61b789fdc285..f028724c676fb7437c902c9ef45a7a795525bde2 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-want.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-want.md
@@ -108,10 +108,10 @@ import Want from '@ohos.application.Want';
```
* 文件描述符(FD)
```ts
- import fileio from '@ohos.fileio';
+ import fs from '@ohos.file.fs';
let fd;
try {
- fd = fileio.openSync('/data/storage/el2/base/haps/pic.png');
+ fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd;
} catch(e) {
console.error('openSync fail: ${JSON.stringify(e)}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-audio.md b/zh-cn/application-dev/reference/apis/js-apis-audio.md
index fb8bd192c4a74bdf591651bab3c977acc3ee7de7..bfc30141778b66e77e3fa527d418373c6246b960 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-audio.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-audio.md
@@ -689,21 +689,19 @@ async function createTonePlayerBefore(){
| forceType | [InterruptForceType](#interruptforcetype9) | 是 | 操作是由系统执行或是由应用程序执行。 |
| hintType | [InterruptHint](#interrupthint) | 是 | 中断提示。 |
-## VolumeEvent8+
+## VolumeEvent9+
音量改变时,应用接收的事件。
-**系统接口:** 该接口为系统接口
-
**系统能力:** SystemCapability.Multimedia.Audio.Volume
| 名称 | 类型 | 必填 | 说明 |
| ---------- | ----------------------------------- | ---- | -------------------------------------------------------- |
-| volumeType | [AudioVolumeType](#audiovolumetype) | 是 | 音量流类型。 |
-| volume | number | 是 | 音量等级,可设置范围通过getMinVolume和getMaxVolume获取。 |
-| updateUi | boolean | 是 | 在UI中显示音量变化。 |
-| volumeGroupId9+ | number | 是 | 音量组id。可用于getGroupManager入参 |
-| networkId9+ | string | 是 | 网络id。 |
+| volumeType | [AudioVolumeType](#audiovolumetype) | 是 | 音量流类型。 |
+| volume | number | 是 | 音量等级,可设置范围通过getMinVolume和getMaxVolume获取。 |
+| updateUi | boolean | 是 | 在UI中显示音量变化。 |
+| volumeGroupId | number | 是 | 音量组id。可用于getGroupManager入参。
此接口为系统接口。 |
+| networkId | string | 是 | 网络id。
此接口为系统接口。 |
## MicStateChangeEvent9+
@@ -1975,12 +1973,12 @@ audioManager.isMicrophoneMute().then((value) => {
});
```
-### on('volumeChange')(deprecated)
+### on('volumeChange')9+
on(type: 'volumeChange', callback: Callback\): void
> **说明:**
-> 从 API version 8 开始支持,从 API version 9 开始废弃,建议使用AudioVolumeManager中的[on('volumeChange')](#onvolumechange9)替代。
+> 建议使用AudioVolumeManager中的[on('volumeChange')](#onvolumechange9)替代。
监听系统音量变化事件。
@@ -1995,7 +1993,7 @@ on(type: 'volumeChange', callback: Callback\): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | 是 | 事件回调类型,支持的事件为:'volumeChange'(系统音量变化事件,检测到系统音量改变时,触发该事件)。 |
-| callback | Callback<[VolumeEvent](#volumeevent8)> | 是 | 回调方法。 |
+| callback | Callback<[VolumeEvent](#volumeevent9)> | 是 | 回调方法。 |
**示例:**
@@ -2304,7 +2302,7 @@ on(type: 'volumeChange', callback: Callback\): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | 是 | 事件回调类型,支持的事件为:'volumeChange'。 |
-| callback | Callback<[VolumeEvent](#volumeevent8)> | 是 | 回调方法。 |
+| callback | Callback<[VolumeEvent](#volumeevent9)> | 是 | 回调方法。 |
**错误码:**
@@ -4037,6 +4035,7 @@ audioRoutingManager.off('preferOutputDeviceChangeForRendererInfo', () => {
| clientUid | number | 是 | 否 | 音频渲染器客户端应用程序的Uid。
此接口为系统接口。 |
| rendererInfo | [AudioRendererInfo](#audiorendererinfo8) | 是 | 否 | 音频渲染器信息。 |
| rendererState | [AudioState](#audiostate) | 是 | 否 | 音频状态。
此接口为系统接口。|
+| deviceDescriptors | [AudioDeviceDescriptors](#audiodevicedescriptors) | 是 | 否 | 音频设备描述。|
**示例:**
@@ -4095,6 +4094,7 @@ audioStreamManager.on('audioRendererChange', (AudioRendererChangeInfoArray) =>
| clientUid | number | 是 | 否 | 音频采集器客户端应用程序的Uid。
此接口为系统接口。 |
| capturerInfo | [AudioCapturerInfo](#audiocapturerinfo8) | 是 | 否 | 音频采集器信息。 |
| capturerState | [AudioState](#audiostate) | 是 | 否 | 音频状态。
此接口为系统接口。|
+| deviceDescriptors | [AudioDeviceDescriptors](#audiodevicedescriptors) | 是 | 否 | 音频设备描述。|
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundle-BundleInstaller.md b/zh-cn/application-dev/reference/apis/js-apis-bundle-BundleInstaller.md
index a81e2dba60db16e30001d53b8124430df6f24beb..2e8a6df4f99515c552f3cd0ac6de5a5bd7f2a535 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundle-BundleInstaller.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundle-BundleInstaller.md
@@ -21,7 +21,7 @@ ohos.permission.INSTALL_BUNDLE
SystemCapability.BundleManager.BundleFramework
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -71,7 +71,7 @@ ohos.permission.INSTALL_BUNDLE
SystemCapability.BundleManager.BundleFramework
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -120,7 +120,7 @@ ohos.permission.INSTALL_BUNDLE
SystemCapability.BundleManager.BundleFramework
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -161,7 +161,7 @@ bundle.getBundleInstaller().then(installer => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
- **系统API:** 此接口为系统接口,三方应用不支持调用
+ **系统API:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------- | ------- | ---- | ---- | ------------------ |
@@ -175,7 +175,7 @@ bundle.getBundleInstaller().then(installer => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
- **系统API:** 此接口为系统接口,三方应用不支持调用
+ **系统API:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------ |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundle-LauncherAbilityInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundle-LauncherAbilityInfo.md
index c3be16604ba856d95ce87039cb2061e824937218..e0e5c8fb43aec4ef92d5bfcc11e74c08acbd1842 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundle-LauncherAbilityInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundle-LauncherAbilityInfo.md
@@ -11,7 +11,7 @@ LauncherAbilityInfo信息,通过接口[innerBundleManager.getLauncherAbilityIn
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework。
- **系统API:** 此接口为系统接口,三方应用不支持调用。
+ **系统API:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ---------------------------------------------------- | ---- | ---- | -------------------------------------- |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundle-PermissionDef.md b/zh-cn/application-dev/reference/apis/js-apis-bundle-PermissionDef.md
index cea742c810f683eb9d204efc6ca7f5dc2cfc5220..da0d229c697483b4e7aa92e07f06dbe6f4766c97 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundle-PermissionDef.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundle-PermissionDef.md
@@ -11,7 +11,7 @@
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
- **系统API:** 此接口为系统接口,三方应用不支持调用
+ **系统API:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------------- | ------ | ---- | ---- | -------------- |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundle-remoteAbilityInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundle-remoteAbilityInfo.md
index 62cf35767b4493b382c281b2c72989448bb8fa0d..5c64ff98ca497b2eb7fd4a5d4c031e1d49b09dff 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundle-remoteAbilityInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundle-remoteAbilityInfo.md
@@ -14,7 +14,7 @@ remoteAbility信息。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.DistributedBundleFramework
- **系统API:** 此接口为系统接口,三方应用不支持调用
+ **系统API:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------- | -------------------------------------------- | ---- | ---- | ----------------------- |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md
index ef3853d7c5c52ba7cf2f018cdae5482690ce6f8d..7de51a3267318e9b7d20dc45bb1b5e2f1150b30e 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md
@@ -1,5 +1,5 @@
# BundlePackInfo
-
+此接口为系统
> **说明:**
> 本模块首批接口从API version 9 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
@@ -122,7 +122,7 @@
## ApiVersion
-**系统接口:** 系统接口,三方应用不支持调用。
+**系统接口:** 此接口为系统接口。
**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md
new file mode 100644
index 0000000000000000000000000000000000000000..deeea708b336bd3a01788a178a6353ff29bbeac8
--- /dev/null
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md
@@ -0,0 +1,21 @@
+# BusinessAbilityInfo
+
+> **说明:**
+> 本模块首批接口从API version 10 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
+
+包含基本业务路由信息。
+
+## BusinessAbilityInfo
+
+**系统能力**: SystemCapability.BundleManager.BundleFramework.Core
+
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| --------------------------------- | ------------------------------------------------------------ | ---- | ---- | -------------------- |
+| bundleName | string | 是 | 否 | 表示应用程序的bundleName。 |
+| moduleName | string | 是 | 否 | 表示应用程序的moduleName。 |
+| name | string | 是 | 否 | 业务路由ability名。 |
+| labelId | number | 是 | 否 | 模块标签的资源id。 |
+| descriptionId | number | 是 | 否 | 描述信息的资源id。 |
+| iconId | number | 是 | 否 | 描述ability信息的图标id。 |
+| businessType | [businessAbilityRouter.BusinessType](js-apis-businessAbilityRouter.md#businesstype) | 是 | 否 | 标识枚举业务类型。 |
+| applicationInfo | Array\<[ApplicationInfo](js-apis-bundleManager-applicationInfo.md)> | 是 | 否 | 应用程序的信息。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-launcherAbilityInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-launcherAbilityInfo.md
index c565e6555c96502f9bfa35e756c80d41127cb03c..6dfe1b84be68dcdda34f3eb03cf204f513faf9a3 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-launcherAbilityInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-launcherAbilityInfo.md
@@ -8,7 +8,7 @@
**系统能力:** SystemCapability.BundleManager.BundleFramework.Launcher。
- **系统:** 系统接口,三方应用不支持调用。
+ **系统:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ----------------------------------------------------------- | ---- | ---- | ------------------------------------ |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
index 81792364b3b24c0fe0dfe978025b425c4721cb89..02e5bdb3b7f7e261cb411f9dec3ad2a9c24e8226 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
@@ -48,7 +48,7 @@ import bundleManager from '@ohos.bundle.bundleManager';
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
- **系统接口:** 系统接口,不支持三方应用调用。
+ **系统接口:** 此接口为系统接口。
| 名称 | 值 | 说明 |
| ------------------------------------ | ---------- | ------------------------------------------------------------ |
@@ -63,7 +63,7 @@ Ability组件信息标志,指示需要获取的Ability组件信息的内容。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
- **系统接口:** 系统接口,不支持三方应用调用。
+ **系统接口:** 此接口为系统接口。
| 名称 | 值 | 说明 |
| --------------------------------- | ---------- | ------------------------------------------------------------ |
@@ -80,7 +80,7 @@ Ability组件信息标志,指示需要获取的Ability组件信息的内容。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
- **系统接口:** 系统接口,不支持三方应用调用。
+ **系统接口:** 此接口为系统接口。
| 名称 | 值 | 说明 |
| ------------------------------------------- | ---------- | ------------------------------------------------------------ |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleMonitor.md b/zh-cn/application-dev/reference/apis/js-apis-bundleMonitor.md
index 8b00ad32d9ad9f50939f3898ab8805876e8b4819..639b134facaa224ce680fdecf78220e2add53a34 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundleMonitor.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundleMonitor.md
@@ -24,7 +24,7 @@ import bundleMonitor from '@ohos.bundle.bundleMonitor';
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ---------- | ------ | ---- | ---- | -------------------------- |
@@ -39,7 +39,7 @@ on(type: BundleChangedEvent, callback: Callback\): void;
**需要权限:** ohos.permission.LISTEN_BUNDLE_CHANGE
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
@@ -72,7 +72,7 @@ off(type: BundleChangedEvent, callback?: Callback\): void;
**需要权限:** ohos.permission.LISTEN_BUNDLE_CHANGE
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
diff --git a/zh-cn/application-dev/reference/apis/js-apis-businessAbilityRouter.md b/zh-cn/application-dev/reference/apis/js-apis-businessAbilityRouter.md
new file mode 100644
index 0000000000000000000000000000000000000000..39213c877d58f8a243a1fd29dd8399f1a82da5ec
--- /dev/null
+++ b/zh-cn/application-dev/reference/apis/js-apis-businessAbilityRouter.md
@@ -0,0 +1,130 @@
+# @ohos.app.businessAbilityRouter (业务路由模块)
+
+本模块用于查询当前设备上安装的各种应用程序的路由ability信息。通过业务路由提供标准的业务模板和业务管理能力,开发者可以按照指定的业务类别注册标准业务,丰富的业务形成一个庞大的超市。系统应用或者三方应用可以从业务路由中获取所需业务,并选择合适的业务使用。同时业务路由提供统一的跳转管控规则,控制应用与业务之间的合理跳转,杜绝前后台任意的跳转行为,避免三方应用通过跳转变相分发,解决安全弱、体验差的问题。
+
+> **说明:**
+>
+> 本模块首批接口从API version 10 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
+
+本模块接口为系统接口。
+
+## 导入模块
+
+``` ts
+import businessAbilityRouter from '@ohos.app.businessAbilityRouter';
+```
+
+## 权限列表
+
+| 权限 | 权限等级 | 描述 |
+| ------------------------------------------ | ------------ | -------------------- |
+| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | 可查询所有应用信息。 |
+
+权限等级参考[权限等级说明](../../security/accesstoken-overview.md#权限等级说明)。
+
+## BusinessType
+
+此枚举值用于标识过滤条件类型。
+
+**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
+
+**系统接口:** 此接口为系统接口。
+
+| 名称 | 值 | 说明 |
+| ----------- | ---- | ------------------------------------ |
+| SHARE | 0 | 标识具有共享类型的ability信息。 |
+| UNSPECIFIED | 255 | 标识未指定类型的ability信息。 |
+
+## BusinessAbilityFilter
+
+此过滤值用于过滤查询的ability类型。
+
+**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall
+
+**系统接口:** 此接口为系统接口。
+
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| ------------ | ------------ | ---- | ---- | -------------------------------------- |
+| businessType | BusinessType | 是 | 否 | 标识ability信息的类型。 |
+| mimeType | string | 是 | 否 | 标识支持mime类型的ability信息。 |
+| uri | string | 是 | 否 | 标识ability信息支持的uri。 |
+
+## businessAbilityRouter.queryBusinessAbilityInfo
+
+queryBusinessAbilityInfo(filter: BusinessAbilityFilter, callback: AsyncCallback\\>): void;
+
+以异步方法通过给定的过滤条件查询ability信息。使用callback异步回调。成功返回查询到的路由ability信息,失败返回对应错误信息。
+
+**需要权限:** ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+
+**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
+
+**系统API:** 此接口为系统接口。
+
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| ----------- | ------ | ---- | --------------------------------------- |
+| filter | [BusinessAbilityFilter](#businessabilityfilter) | 是 | 支持按业务类型过滤的对象。 |
+| callback | AsyncCallback\\> | 是 | 回调函数。返回查询到的ability信息,否则为错误对象。 |
+
+**示例:**
+
+```ts
+import businessAbilityRouter from '@ohos.app.businessAbilityRouter';
+let filter = {businessType: businessAbilityRouter.BusinessType.SHARE};
+
+try {
+ businessAbilityRouter.queryBusinessAbilityInfo(filter)
+ .then(() => {
+ console.info('queryBusinessAbilityInfo success');
+ }).catch((error) => {
+ console.error('queryBusinessAbilityInfo failed ' + error.message);
+ });
+} catch (error) {
+ console.error('queryBusinessAbilityInfo failed ' + error.message);
+}
+```
+
+## businessAbilityRouter.queryBusinessAbilityInfo
+
+queryBusinessAbilityInfo(filter: BusinessAbilityFilter): Promise\\>;
+
+以异步方法通过给定的过滤条件查询ability信息。使用Promise异步回调,成功返回查询到的路由ability信息,失败返回对应错误信息。
+
+**需要权限:** ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+
+**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
+
+**系统API:** 此接口为系统接口。
+
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| ----------- | ------------------------------- | ---- | --------------------------------------- |
+| filter | [BusinessAbilityFilter](#businessabilityfilter) | 是 | 包含要查询的ability信息的筛选类型。 |
+
+**返回值:**
+
+| 类型 | 说明 |
+| ------------------------------------------------------------ | ------------------------------------------- |
+| Promise\\> | Promise对象,返回符合过滤条件的ability信息。 |
+
+**示例:**
+
+```ts
+import businessAbilityRouter from '@ohos.app.businessAbilityRouter';
+let filter = {businessType: businessAbilityRouter.BusinessType.SHARE};
+
+try {
+ businessAbilityRouter.queryBusinessAbilityInfo(filter, (error, data) => {
+ if (error) {
+ console.error('queryBusinessAbilityInfo failed ' + error.message);
+ return;
+ }
+ console.info('queryBusinessAbilityInfo success');
+ });
+} catch (error) {
+ console.error('queryBusinessAbilityInfo failed ' + error.message);
+}
+```
diff --git a/zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md b/zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md
index 71a3d4ec9aae0e71dc30a4ef9c7eb7f8912a0784..cd91357cd4a3e4840d40d9eaed33e91726b54400 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md
@@ -109,7 +109,7 @@ getDefaultApplication(type: string, userId?: number): Promise\
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -165,7 +165,7 @@ getDefaultApplication(type: string, userId: number, callback: AsyncCallback\) : void
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -266,7 +266,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId?: number):
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -338,7 +338,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId: number, ca
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -399,7 +399,7 @@ setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCal
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -458,7 +458,7 @@ resetDefaultApplication(type: string, userId?: number): Promise\
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -508,7 +508,7 @@ resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\) : void;
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-display.md b/zh-cn/application-dev/reference/apis/js-apis-display.md
index 8b73f026dcdc1864fcde3cc02707a890f3c39a9e..db7ab01ce6978bf0a8d49cf115a07ac5f4cd2f39 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-display.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-display.md
@@ -291,6 +291,63 @@ try {
}
```
+## display.on('privateModeChange')10+
+
+on(type: 'privateModeChange', callback: Callback<boolean>): void
+
+开启屏幕隐私模式变化的监听。当屏幕前台有隐私窗口,则屏幕处于隐私模式,屏幕中的隐私窗口内容无法被截屏或录屏。
+
+**系统接口:** 此接口为系统接口。
+
+**系统能力:** SystemCapability.WindowManager.WindowManager.Core
+
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| -------- |------------------------------------------| ---- | ------------------------------------------------------- |
+| type | string | 是 | 监听事件,固定为'privateModeChange',表示屏幕隐私模式状态发生变化。 |
+| callback | Callback<boolean> | 是 | 回调函数。表示屏幕隐私模式是否改变。true表示屏幕由非隐私窗口模式变为隐私模式,false表示屏幕由隐私模式变为非隐私模式。 |
+
+**示例:**
+
+```js
+let callback = (data) => {
+ console.info('Listening enabled. Data: ' + JSON.stringify(data));
+};
+try {
+ display.on("privateModeChange", callback);
+} catch (exception) {
+ console.error('Failed to register callback. Code: ' + JSON.stringify(exception));
+}
+```
+
+## display.off('privateModeChange')10+
+
+off(type: 'privateModeChange', callback?: Callback<boolean>): void
+
+关闭屏幕隐私模式变化的监听。当屏幕前台有隐私窗口,则屏幕处于隐私模式,屏幕中的隐私窗口内容无法被截屏或录屏。
+
+**系统接口:** 此接口为系统接口。
+
+**系统能力:** SystemCapability.WindowManager.WindowManager.Core
+
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| -------- |------------------------------------------| ---- | ------------------------------------------------------- |
+| type | string | 是 | 监听事件,固定为'privateModeChange',表示屏幕隐私模式状态发生变化。 |
+| callback | Callback<boolean> | 否 | 回调函数。表示屏幕隐私模式是否改变。true表示屏幕由非隐私模式变为隐私模式,false表示屏幕由隐私模式变为非隐私模式。 |
+
+**示例:**
+
+```js
+try {
+ display.off("privateModeChange");
+} catch (exception) {
+ console.error('Failed to unregister callback. Code: ' + JSON.stringify(exception));
+}
+```
+
## display.getDefaultDisplay(deprecated)
getDefaultDisplay(callback: AsyncCallback<Display>): void
diff --git a/zh-cn/application-dev/reference/apis/js-apis-image.md b/zh-cn/application-dev/reference/apis/js-apis-image.md
index 8c0eb7fb0049de9da17c35d9c82f0e66e6483fb1..87fac2670885d45b4bdb29a743e0633f429a04c4 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-image.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-image.md
@@ -79,7 +79,7 @@ image.createPixelMap(color, opts, (error, pixelmap) => {
## PixelMap7+
-图像像素类,用于读取或写入图像数据以及获取图像信息。在调用PixelMap的方法前,需要先通过createPixelMap创建一个PixelMap实例。
+图像像素类,用于读取或写入图像数据以及获取图像信息。在调用PixelMap的方法前,需要先通过createPixelMap创建一个PixelMap实例。目前pixelmap序列化大小最大128MB,超过会送显失败。大小计算方式为(宽\*高\*每像素占用字节数)。
### 属性
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md
index e37ad10f026c01739eb8f354723a3f917ded9326..195a244212a7519294558ab9c7ab1821ec9e81c5 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md
@@ -41,12 +41,12 @@ Want是对象间信息传递的载体, 可以用于应用组件间的信息传
- 传递FD(文件描述符)数据(在UIAbility对象中调用,其中示例中的context为UIAbility的上下文对象)
```ts
- import fileio from '@ohos.fileio';
+ import fs from '@ohos.file.fs';
// ...
let fd;
try {
- fd = fileio.openSync('/data/storage/el2/base/haps/pic.png');
+ fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd;
} catch(e) {
console.error('openSync fail: ${JSON.stringify(e)}');
}
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md
index 54740765f23e2b2e45f45af87ddc781604604b6b..064e036e1a0e3a95440c202d04e1d5c98797d329 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md
@@ -88,7 +88,7 @@ export default class EntryAbility extends UIAbility {
}
```
-## ApplicationContext.off(type: 'abilityLifecycle', callbackId: number, callback: AsyncCallback)
+## ApplicationContext.off(type: 'abilityLifecycle', callbackId: number, callback: AsyncCallback\)
off(type: 'abilityLifecycle', callbackId: **number**, callback: AsyncCallback<**void**>): **void**;
@@ -206,7 +206,7 @@ export default class EntryAbility extends UIAbility {
}
```
-## ApplicationContext.off(type: 'environment', callbackId: number, callback: AsyncCallback)
+## ApplicationContext.off(type: 'environment', callbackId: number, callback: AsyncCallback\)
off(type: 'environment', callbackId: **number**, callback: AsyncCallback<**void**>): **void**;
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
index 85b44d8120beb7dbb836ed74b9d3c45dc8fdeac8..9b835fee85ba01b9ccfd41b2bc65ccca524763f1 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
@@ -56,7 +56,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
@@ -128,7 +128,7 @@ startAbility(want: Want, options?: StartOptions): Promise\;
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
@@ -198,7 +198,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
@@ -275,7 +275,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
@@ -351,7 +351,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
@@ -436,7 +436,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
@@ -1330,7 +1330,7 @@ startAbilityByCall(want: Want): Promise<Caller>;
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal Error. |
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
index 1cf39b1e8171f8c419208e4b904bb18be6a17f18..7d2b3c2fd04e462648c22379121bb81726d246a9 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
@@ -54,7 +54,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -118,7 +118,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -191,7 +191,7 @@ startAbility(want: Want, options?: StartOptions): Promise<void>;
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -260,7 +260,7 @@ startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>):
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -328,7 +328,7 @@ startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -406,7 +406,7 @@ startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityRes
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -477,7 +477,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -549,7 +549,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -629,7 +629,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -1584,7 +1584,7 @@ startAbilityByCall(want: Want): Promise<Caller>;
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -1691,7 +1691,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -1763,7 +1763,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -1837,7 +1837,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
-| 16000012 | The previous ability is starting, wait start later. |
+| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-installer.md b/zh-cn/application-dev/reference/apis/js-apis-installer.md
index d00cf928cd584ae05e54c97ddb31486b3ef95e95..fa3899aefcdbbc4c796e7da227412702ef9b2d31 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-installer.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-installer.md
@@ -25,7 +25,7 @@ getBundleInstaller(callback: AsyncCallback\): void;
获取BundleInstaller对象,使用callback形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
@@ -59,7 +59,7 @@ getBundleInstaller(): Promise\;
获取BundleInstaller对象,使用callback形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
@@ -89,7 +89,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
以异步方法安装应用,使用callback形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**需要权限:** ohos.permission.INSTALL_BUNDLE
@@ -120,6 +120,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
| 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. |
| 17700036 | Failed to install the HSP because lacks appropriate permissions. |
| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. |
+| 17700041 | Failed to install because enterprise device management disallow install. |
**示例:**
@@ -149,13 +150,84 @@ try {
}
```
+## BundleInstaller.install
+
+install(hapFilePaths: Array\, installParam?: InstallParam) : Promise\;
+
+以异步方法安装应用,使用Promise形式返回结果。
+
+**系统接口:** 此接口为系统接口。
+
+**需要权限:** ohos.permission.INSTALL_BUNDLE
+
+**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
+
+**参数:**
+
+| 参数名 | 类型 | 必填 | 说明 |
+| ------------ | ----------------------------- | ---- | ------------------------------------------------------------ |
+| hapFilePaths | Array\ | 是 | 存储应用程序包的路径。路径应该是当前应用程序中存放HAP的数据目录。当传入的路径是一个目录时, 该目录下只能放同一个应用的HAP,且这些HAP的签名需要保持一致。 |
+| installParam | [InstallParam](#installparam) | 否 | 指定安装所需的其他参数。 |
+
+**返回值:**
+
+| 类型 | 说明 |
+| --------------- | -------------------------------------- |
+| Promise\ | Promise对象。无返回结果的Promise对象。 |
+
+**错误码:**
+
+以下错误码的详细介绍请参见[ohos.bundle错误码](../errorcodes/errorcode-bundle.md)。
+
+| 错误码ID | 错误信息 |
+| -------- | ------------------------------------------------------------ |
+| 17700004 | The specified user ID is not found. |
+| 17700010 | Failed to install the HAP because the HAP fails to be parsed. |
+| 17700011 | Failed to install the HAP because the HAP signature fails to be verified. |
+| 17700012 | Failed to install the HAP because the HAP path is invalid or the HAP is too large. |
+| 17700015 | Failed to install the HAPs because they have different configuration information. |
+| 17700016 | Failed to install the HAP because of insufficient system disk space. |
+| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
+| 17700018 | Failed to install because the dependent module does not exist. |
+| 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. |
+| 17700036 | Failed to install the HSP because lacks appropriate permissions. |
+| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. |
+| 17700041 | Failed to install because enterprise device management disallow install. |
+
+**示例:**
+
+```ts
+import installer from '@ohos.bundle.installer';
+let hapFilePaths = ['/data/storage/el2/base/haps/entry/files/'];
+let installParam = {
+ userId: 100,
+ isKeepData: false,
+ installFlag: 1,
+};
+
+try {
+ installer.getBundleInstaller().then(data => {
+ data.install(hapFilePaths, installParam)
+ .then((data) => {
+ console.info('install success: ' + JSON.stringify(data));
+ }).catch((error) => {
+ console.error('install failed:' + err.message);
+ });
+ }).catch(error => {
+ console.error('getBundleInstaller failed. Cause: ' + error.message);
+ });
+} catch (error) {
+ console.error('getBundleInstaller failed. Cause: ' + error.message);
+}
+```
+
## BundleInstaller.uninstall
uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
以异步方法卸载应用,使用callback形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**需要权限:** ohos.permission.INSTALL_BUNDLE
@@ -213,7 +285,7 @@ uninstall(uninstallParam: UninstallParam, callback : AsyncCallback\) : voi
以异步方法卸载一个共享包,使用callback形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**需要权限:** ohos.permission.INSTALL_BUNDLE
@@ -267,7 +339,7 @@ uninstall(uninstallParam: UninstallParam) : Promise\;
以异步方法卸载一个共享包,使用Promise形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**需要权限:** ohos.permission.INSTALL_BUNDLE
@@ -326,7 +398,7 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
以异步方法回滚应用,使用callback形式返回结果。
-**系统接口:** 此接口为系统接口,三方应用不支持调用
+**系统接口:** 此接口为系统接口。
**需要权限:** ohos.permission.INSTALL_BUNDLE
@@ -382,7 +454,7 @@ try {
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
- **系统接口:** 此接口为系统接口,三方应用不支持调用
+ **系统接口:** 此接口为系统接口。
| 名称 | 类型 | 必填 | 说明 |
| ---------- | ------ | ---------------- | ---------------- |
@@ -395,7 +467,7 @@ try {
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
- **系统接口:** 此接口为系统接口,三方应用不支持调用
+ **系统接口:** 此接口为系统接口。
| 名称 | 类型 | 必填 | 说明 |
| ------------------------------ | ------------------------------ | ------------------ | ------------------ |
@@ -412,7 +484,7 @@ try {
**系统能力:** SystemCapability.BundleManager.BundleFramework.Core
- **系统接口:** 此接口为系统接口,三方应用不支持调用
+ **系统接口:** 此接口为系统接口。
| 名称 | 类型 | 必填 | 说明 |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-nfcController.md b/zh-cn/application-dev/reference/apis/js-apis-nfcController.md
index b46c3e52c46c256fad4ca33851398ed62e7aad52..6721457686b722d50b67c43a0612213b0afc90f0 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-nfcController.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-nfcController.md
@@ -64,7 +64,7 @@ openNfc(): boolean
## controller.enableNfc9+
-enableNfc(): boolean
+enableNfc(): void
打开NFC开关。
@@ -101,7 +101,7 @@ closeNfc(): boolean
## controller.disableNfc9+
-disableNfc(): boolean
+disableNfc(): void
关闭NFC开关。
diff --git a/zh-cn/application-dev/reference/apis/js-apis-overlay.md b/zh-cn/application-dev/reference/apis/js-apis-overlay.md
index 3faa6159a50e121b6b2c99e548cfd0afa3cb8506..731ff7e80b7cf164f07ed15f642cb58bf48ba67f 100755
--- a/zh-cn/application-dev/reference/apis/js-apis-overlay.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-overlay.md
@@ -114,7 +114,7 @@ setOverlayEnabledByBundleName(bundleName:string, moduleName:string, isEnabled: b
**系统能力:** SystemCapability.BundleManager.BundleFramework.Overlay
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -170,7 +170,7 @@ setOverlayEnabledByBundleName(bundleName:string, moduleName:string, isEnabled: b
**系统能力:** SystemCapability.BundleManager.BundleFramework.Overlay
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -394,7 +394,7 @@ getOverlayModuleInfoByBundleName(bundleName: string, moduleName?: string): Promi
**系统能力:** SystemCapability.BundleManager.BundleFramework.Overlay
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -446,7 +446,7 @@ getOverlayModuleInfoByBundleName(bundleName: string, moduleName: string, callbac
**系统能力:** SystemCapability.BundleManager.BundleFramework.Overlay
-**系统API:** 此接口为系统接口,三方应用不支持调用
+**系统API:** 此接口为系统接口。
**参数:**
@@ -496,7 +496,7 @@ getOverlayModuleInfoByBundleName(bundleName: string, callback: AsyncCallback\7+ | {[key:string]:object} | 是 | 是 | 设置的其他附加属性数据。 |
+| additions7+ | {[key:string]:object} | 是 | 是 | 设置的其他附加属性数据, 暂不支持。 |
| mimeTypes7+ | Array<string> | 是 | 否 | 剪贴板内容条目的数据类型,非重复的类型列表。 |
-| tag7+ | string | 是 | 是 | 用户自定义标签。 |
+| tag7+ | string | 是 | 是 | 用户自定义标签, 暂不支持。 |
| timestamp7+ | number | 是 | 否 | 剪贴板数据的写入时间戳(单位:ms)。 |
-| localOnly7+ | boolean | 是 | 是 | 配置剪贴板内容是否为“仅在本地”。默认值为true。
- 配置为true时,表示内容仅在本地,不会在设备之间传递。
- 配置为false时,表示内容将在设备间传递。 |
+| localOnly7+ | boolean | 是 | 是 | 配置剪贴板内容是否为“仅在本地”, 默认值为true。暂不支持, 推荐使用shareOption属性。
- 配置为true时,表示内容仅在本地,不会在设备之间传递。
- 配置为false时,表示内容将在设备间传递。 |
| shareOption9+ | [ShareOption](#shareoption9) | 是 | 是 | 指示剪贴板数据可以粘贴到的范围,如果未设置或设置不正确,则默认值为CROSSDEVICE。 |
## PasteDataRecord7+
diff --git a/zh-cn/application-dev/reference/apis/js-apis-tagSession.md b/zh-cn/application-dev/reference/apis/js-apis-tagSession.md
index 32b66bd40eecb8b10ef4313dbd7325c80cf8162e..fda6cf598264cd5e2cbb6972ee0f24329dc51446 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-tagSession.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-tagSession.md
@@ -183,8 +183,6 @@ isTagConnected(): boolean
> **说明:**
> 从 API version 7 开始支持,从 API version 9 开始废弃,建议使用[tagSession.isConnected](#tagsessionisconnected9)替代。
-**需要权限:** ohos.permission.NFC_TAG
-
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
@@ -211,8 +209,6 @@ isConnected(): boolean
检查是否已与标签建立连接。
-**需要权限:** ohos.permission.NFC_TAG
-
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
diff --git a/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md b/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
index 536201bfe0805ff55544d1c84de0fe137e7fcff7..81aa95dac6af8492a5c2a0e6375b2beb384873e1 100644
--- a/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
+++ b/zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
@@ -42,6 +42,9 @@
- [背景模糊设置](ts-universal-attributes-backgroundBlurStyle.md)
- [分布式迁移标识](ts-universal-attributes-restoreId.md)
- [前景色设置](ts-universal-attributes-foreground-color.md)
+ - [图像球面效果设置](ts-universal-attributes-sphericalEffect.md)
+ - [图像渐亮效果设置](ts-universal-attributes-lightUpEffect.md)
+ - [图像像素扩展效果设置](ts-universal-attributes-pixelStretchEffect.md)
- [文本通用属性](ts-universal-attributes-text-style.md)
- 手势处理
- [绑定手势方法](ts-gesture-settings.md)
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/datePickerLightUp1.png b/zh-cn/application-dev/reference/arkui-ts/figures/datePickerLightUp1.png
new file mode 100644
index 0000000000000000000000000000000000000000..120c59b0dcd102d538973fa3c62784d99e93cc17
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/datePickerLightUp1.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/datePickerLightUp2.png b/zh-cn/application-dev/reference/arkui-ts/figures/datePickerLightUp2.png
new file mode 100644
index 0000000000000000000000000000000000000000..a2172a8da22332f1ccec1714112e4a229ca36f53
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/datePickerLightUp2.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textInputSpherical1.png b/zh-cn/application-dev/reference/arkui-ts/figures/textInputSpherical1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f74c71cb969043be9633db7a9992c68b1be6d184
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textInputSpherical1.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textInputSpherical2.png b/zh-cn/application-dev/reference/arkui-ts/figures/textInputSpherical2.png
new file mode 100644
index 0000000000000000000000000000000000000000..b4c67f4f18c92adc7a7f9e78d3935ba2c60da40a
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textInputSpherical2.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp1.png b/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp1.png
new file mode 100644
index 0000000000000000000000000000000000000000..d696e61fa669c6592e260e3ad0f3206e2cf45074
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp1.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp2.png b/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp2.png
new file mode 100644
index 0000000000000000000000000000000000000000..8674b8af58468eec28e065311b610c290265d882
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp2.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp3.png b/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp3.png
new file mode 100644
index 0000000000000000000000000000000000000000..d22967a38886f445e189451aae173edb2455c478
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textLightUp3.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch1.png b/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch1.png
new file mode 100644
index 0000000000000000000000000000000000000000..bcf4db606d9e10ef6c418474bbaedae96c232436
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch1.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch2.png b/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch2.png
new file mode 100644
index 0000000000000000000000000000000000000000..aca08823440ca1fb14ca9a681c625ed4e392154f
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch2.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch3.png b/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch3.png
new file mode 100644
index 0000000000000000000000000000000000000000..418870d8dce2b5a7c492bdc26193894a57b9b66d
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/textPixelStretch3.png differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md
index 77185a29a95553779eb45351b086d1944d53e95f..504e2cde4f47a553f302dd77f54155121b2cefd1 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md
@@ -5,7 +5,7 @@
> **说明:**
>
> 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
-
+> 使用该组件时请设置高度值。
## 子组件
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md
index 0389e734d011200154e3832fdd90af7ce62f9d1e..422eba6537a786177e7c3dc612c5f2158db4d9fc 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md
@@ -20,8 +20,8 @@ TextArea(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Tex
| 参数名 | 参数类型 | 必填 | 参数描述 |
| ----------------------- | ---------------------------------------- | ---- | -------------- |
-| placeholder | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置无输入时的提示文本,输入内容后,提示文本不显示。 |
-| text | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置输入框当前的文本内容。 |
+| placeholder | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置无输入时的提示文本。输入内容后,提示文本不显示。 |
+| text | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置输入框当前的文本内容。当组件设置[stateStyles](ts-universal-attributes-polymorphic-style.md)等刷新属性时,建议通过onChange事件将状态变量与文本实时绑定,避免组件刷新时TextArea中的文本内容异常。 |
| controller8+ | [TextAreaController](#textareacontroller8) | 否 | 设置TextArea控制器。 |
@@ -102,6 +102,7 @@ struct TextAreaExample {
build() {
Column() {
TextArea({
+ text: this.text,
placeholder: 'The text area can hold an unlimited amount of text. input your word...',
controller: this.controller
})
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md
index c266cfa7660e6994745d7c3ef977aa7eadf7571c..ffa80febf3417ef27c798b4e7d73c3b747e7d9a7 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md
@@ -21,7 +21,7 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te
| 参数名 | 参数类型 | 必填 | 参数描述 |
| ----------------------- | ---------------------------------------- | ---- | --------------- |
| placeholder | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置无输入时的提示文本。 |
-| text | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置输入框当前的文本内容。 |
+| text | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置输入框当前的文本内容。当组件设置[stateStyles](ts-universal-attributes-polymorphic-style.md)等刷新属性时,建议通过onChange事件将状态变量与文本实时绑定,避免组件刷新时TextInput中的文本内容异常。 |
| controller8+ | [TextInputController](#textinputcontroller8) | 否 | 设置TextInput控制器。 |
@@ -135,7 +135,7 @@ struct TextInputExample {
build() {
Column() {
- TextInput({ placeholder: 'input your word...', controller: this.controller })
+ TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller })
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.caretColor(Color.Blue)
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
index afb97ce43429073227f53a53f7d7982eb069776a..a3781242346241c0874800558095b6c205a0a0c2 100755
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
@@ -1232,7 +1232,7 @@ struct WebComponent {
}
```
-### allowWindowOpenMethod9+
+### allowWindowOpenMethod10+
allowWindowOpenMethod(flag: boolean)
@@ -2080,11 +2080,12 @@ onScaleChange(callback: (event: {oldScale: number, newScale: number}) => void)
}
```
-### onUrlLoadIntercept
+### onUrlLoadIntercept(deprecated)
onUrlLoadIntercept(callback: (event?: { data:string | WebResourceRequest }) => boolean)
当Web组件加载url之前触发该回调,用于判断是否阻止此次访问。默认允许加载。
+从API version 10开始不在维护,建议使用[onLoadIntercept10+](#onloadintercept10)代替。
**参数:**
@@ -3100,7 +3101,7 @@ onAudioStateChanged(callback: (event: { playing: boolean }) => void)
### onLoadIntercept10+
-onLoadIntercept(callback: (event?: { request: WebResourceRequest }) => boolean)
+onLoadIntercept(callback: (event?: { data: WebResourceRequest }) => boolean)
当Web组件加载url之前触发该回调,用于判断是否阻止此次访问。默认允许加载。
@@ -3130,11 +3131,11 @@ onLoadIntercept(callback: (event?: { request: WebResourceRequest }) => boolean)
build() {
Column() {
Web({ src: 'www.example.com', controller: this.controller })
- .onUrlLoadIntercept((event) => {
- console.log('url:' + event.request.getRequestUrl())
- console.log('isMainFrame:' + event.request.isMainFrame())
- console.log('isRedirect:' + event.request.isRedirect())
- console.log('isRequestGesture:' + event.request.isRequestGesture())
+ .onLoadIntercept((event) => {
+ console.log('url:' + event.data.getRequestUrl())
+ console.log('isMainFrame:' + event.data.isMainFrame())
+ console.log('isRedirect:' + event.data.isRedirect())
+ console.log('isRequestGesture:' + event.data.isRequestGesture())
return true
})
}
@@ -3340,6 +3341,18 @@ isRequestGesture(): boolean
| ------- | -------------------- |
| boolean | 返回资源请求是否与手势(如点击)相关联。 |
+### getRequestMethod9+
+
+getRequestMethod(): string
+
+获取请求方法。
+
+**返回值:**
+
+| 类型 | 说明 |
+| ------- | -------------------- |
+| string | 返回请求方法。 |
+
## Header
Web组件返回的请求/响应头对象。
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-columnsplit.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-columnsplit.md
index 0d20a6caeaf865b9d0b217a1aa418980ff340479..72b91171c695749c6adc5588e21c68b7beadbec5 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-columnsplit.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-columnsplit.md
@@ -29,6 +29,8 @@ ColumnSplit()
> 与RowSplit相同,ColumnSplit的分割线最小能拖动到刚好包含子组件。
>
> 在真机中查看拖动效果,预览器中不支持拖动。
+>
+> 不支持clip、margin通用属性。
## 示例
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-grid.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-grid.md
index 837e139eda12d17eef6a47e15de921e125484179..25c8005fdeea7e965621140a00e2ae8f53e96b07 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-grid.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-grid.md
@@ -24,6 +24,8 @@
> if/else/ForEach/LazyForEach发生变化以后,会更新子节点索引值。
>
> Grid子组件的visibility属性设置为Hidden或None时依然会计算索引值。
+>
+> Grid子组件的visibility属性设置为None时不显示,但依然会占用子组件对应的网格。
## 接口
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md
index 4a6ba919efbb06c8b77c66add018249b35ae3ef8..d90477e50c0166840c2d6cd575c4dc32768b7f5a 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md
@@ -27,6 +27,8 @@
> ListItemGroup作为一个整体计算一个索引值,ListItemGroup内部的ListItem不计算索引值。
>
> List子组件visibility属性设置为Hidden或None依然会计算索引值。
+>
+> List子组件的visibility属性设置为None时不显示,但该子组件上下的space还会生效。
## 接口
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md
index 6563873c5d243b86b9f8fab1a64279037eaa6ef6..7d8671137f9b2af63d2440dd6c9fac951d5fa123 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md
@@ -26,7 +26,7 @@ ListItem(value?: string)
| -------- | -------- | -------- |
| sticky(deprecated) | [Sticky](#stickydeprecated枚举说明) | 设置ListItem吸顶效果。
默认值:Sticky.None
从API version9开始废弃,推荐使用[List组件sticky属性](ts-container-list.md#属性)。 |
| editable(deprecated) | boolean \| [EditMode](#editmodedeprecated枚举说明) | 当前ListItem元素是否可编辑,进入编辑模式后可删除或移动列表项。
从API version9开始废弃。
默认值:false |
-| selectable8+ | boolean | 当前ListItem元素是否可以被鼠标框选。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
外层List容器的鼠标框选开启时,ListItem的框选才生效。
默认值:true |
+| selectable8+ | boolean | 当前ListItem元素是否可以被鼠标框选。
**说明:**
外层List容器的鼠标框选开启时,ListItem的框选才生效。
默认值:true |
| swipeAction9+ | {
start?: CustomBuilder,
end?:CustomBuilder,
edgeEffect?: [SwipeEdgeEffect](#swipeedgeeffect9枚举说明),
} | 用于设置ListItem的划出组件。
- start: ListItem向右划动时item左边的组件(List垂直布局时)或ListItem向下划动时item上方的组件(List水平布局时)。
- end: ListItem向左划动时item右边的组件(List垂直布局时)或ListItem向上划动时item下方的组件(List水平布局时)。
- edgeEffect: 滑动效果。
**说明:**
start和end对应的@builder函数中顶层必须是单个组件,不能是if/else、ForEach、LazyForEach语句。 |
## Sticky(deprecated)枚举说明
@@ -55,7 +55,7 @@ ListItem(value?: string)
| 名称 | 功能描述 |
| -------- | -------- |
-| onSelect(event: (isSelected: boolean) => void)8+ | ListItem元素被鼠标框选的状态改变时触发回调。
isSelected:进入鼠标框选范围即被选中返回true, 移出鼠标框选范围即未被选中返回false。
从API version 9开始,该接口支持在ArkTS卡片中使用。 |
+| onSelect(event: (isSelected: boolean) => void)8+ | ListItem元素被鼠标框选的状态改变时触发回调。
isSelected:进入鼠标框选范围即被选中返回true, 移出鼠标框选范围即未被选中返回false。 |
## 示例
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-rowsplit.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-rowsplit.md
index da4043d3bf0612b044344ba91e947b2d52cb80f6..35e7c2907c15ecee2803b71db4e8976e8135bcb6 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-rowsplit.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-rowsplit.md
@@ -26,6 +26,8 @@ RowSplit()
> RowSplit的分割线最小能拖动到刚好包含子组件。
>
> 在真机中查看拖动效果,预览器中不支持拖动。
+>
+> 不支持clip、margin通用属性。
## 示例
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-waterflow.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-waterflow.md
index cba3fda2ef1385d851b80935f6b4406aba972f04..8be87f8269e96ba280ae5a236231e7b8bd1b1a27 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-waterflow.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-waterflow.md
@@ -14,6 +14,9 @@
包含[FlowItem](ts-container-flowitem.md)子组件。
+> **说明:**
+>
+> WaterFlow子组件的visibility属性设置为None时不显示,但依然会占用子组件对应的网格。
## 接口
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md b/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md
index 8d2253624748281833834205d7620d6d25cc6cb4..27e49abebea9cec1e379b5ff2168fb034e819dff 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md
@@ -12,17 +12,17 @@
| 名称 | 参数类型 | 参数描述 |
| -------- | -------- | -------- |
-| transition | TransitionOptions | 设置组件插入显示和删除隐藏的过渡效果。
默认值:不设置任何过渡效果时,默认有透明度从0到1的过渡效果。若设置了其他过渡效果,以设置的过渡效果为准。
**说明:**
所有参数均为可选参数,详细描述见TransitionOptions参数说明。 |
+| transition | TransitionOptions | 设置组件插入显示和删除隐藏的过渡效果。
默认值:不设置任何过渡效果时,默认有透明度从0到1的过渡效果。若设置了其他过渡效果,以设置的过渡效果为准。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
所有参数均为可选参数,详细描述见TransitionOptions参数说明。 |
## TransitionOptions参数说明
| 参数名称 | 参数类型 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- |
-| type | [TransitionType](ts-appendix-enums.md#transitiontype) | 否 | 默认包括组件新增和删除。
默认值:TransitionType.All
**说明:**
不指定Type时说明插入删除使用同一种效果。 |
-| opacity | number | 否 | 设置组件转场时的透明度效果,为插入时起点和删除时终点的值。
默认值:1
取值范围: [0, 1]
**说明:**
设置小于0的值时,按值为0处理;设置大于1的值时,按值为1处理。 |
-| translate | {
x? : number \| string,
y? : number \| string,
z? : number \| string
} | 否 | 设置组件转场时的平移效果,为插入时起点和删除时终点的值。
-x:横向的平移距离。
-y:纵向的平移距离。
-z:竖向的平移距离。 |
-| scale | {
x? : number,
y? : number,
z? : number,
centerX? : number \| string,
centerY? : number \| string
} | 否 | 设置组件转场时的缩放效果,为插入时起点和删除时终点的值。
-x:横向放大倍数(或缩小比例)。
-y:纵向放大倍数(或缩小比例)。
-z:竖向放大倍数(或缩小比例)。
- centerX、centerY指缩放中心点,centerX和centerY默认值是"50%"。
- 中心点为0时,默认的是组件的左上角。
|
-| rotate | {
x?: number,
y?: number,
z?: number,
angle?: number \| string,
centerX?: number \| string,
centerY?: number \| string
} | 否 | 设置组件转场时的旋转效果,为插入时起点和删除时终点的值。
-x:横向的旋转向量。
-y:纵向的旋转向量。
-z:竖向的旋转向量。
- centerX,centerY指旋转中心点,centerX和centerY默认值是"50%"。
- 中心点为(0,0)时,默认的是组件的左上角。 |
+| type | [TransitionType](ts-appendix-enums.md#transitiontype) | 否 | 默认包括组件新增和删除。
默认值:TransitionType.All
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
不指定Type时说明插入删除使用同一种效果。 |
+| opacity | number | 否 | 设置组件转场时的透明度效果,为插入时起点和删除时终点的值。
默认值:1
取值范围: [0, 1]
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置小于0的值时,按值为0处理;设置大于1的值时,按值为1处理。 |
+| translate | {
x? : number \| string,
y? : number \| string,
z? : number \| string
} | 否 | 设置组件转场时的平移效果,为插入时起点和删除时终点的值。
-x:横向的平移距离。
-y:纵向的平移距离。
-z:竖向的平移距离。
从API version 9开始,该接口支持在ArkTS卡片中使用。 |
+| scale | {
x? : number,
y? : number,
z? : number,
centerX? : number \| string,
centerY? : number \| string
} | 否 | 设置组件转场时的缩放效果,为插入时起点和删除时终点的值。
-x:横向放大倍数(或缩小比例)。
-y:纵向放大倍数(或缩小比例)。
-z:竖向放大倍数(或缩小比例)。
- centerX、centerY指缩放中心点,centerX和centerY默认值是"50%"。
- 中心点为0时,默认的是组件的左上角。
从API version 9开始,该接口支持在ArkTS卡片中使用。 |
+| rotate | {
x?: number,
y?: number,
z?: number,
angle?: number \| string,
centerX?: number \| string,
centerY?: number \| string
} | 否 | 设置组件转场时的旋转效果,为插入时起点和删除时终点的值。
-x:横向的旋转向量。
-y:纵向的旋转向量。
-z:竖向的旋转向量。
- centerX,centerY指旋转中心点,centerX和centerY默认值是"50%"。
- 中心点为(0,0)时,默认的是组件的左上角。
从API version 9开始,该接口支持在ArkTS卡片中使用。 |
## 示例
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-types.md b/zh-cn/application-dev/reference/arkui-ts/ts-types.md
index 6dea36b625b7a3d267bf8f9066b6d244e298f1f7..114b23b9ee5b7ce4da2b93c96cd1da0fce0fee32 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-types.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-types.md
@@ -224,3 +224,13 @@
| ------------- | ---------------------- | ---------------------------------------- |
| CustomBuilder | () => any | 该方法类型必须使用@Builder装饰器修饰。具体用法见[@Builder](../../quick-start/arkts-dynamic-ui-elememt-building.md#builder)。 |
+## PixelStretchEffectOptions10+
+
+像素扩展属性集合,用于描述像素扩展的信息。
+
+| 名称 | 类型 | 必填 | 说明 |
+| ----------- | ------ | ---- | ---------- |
+| left | [Length](#length) | 否 | 组件图像左边沿扩展距离。 |
+| right | [Length](#length) | 否 | 组件图像右边沿像素扩展距离。 |
+| top | [Length](#length) | 否 | 组件图像上边沿像素扩展距离。 |
+| bottom | [Length](#length) | 否 | 组件图像下边沿像素扩展距离。 |
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-lightUpEffect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-lightUpEffect.md
new file mode 100644
index 0000000000000000000000000000000000000000..a9bb7528afe070280842971a5984ad069b6e6fa5
--- /dev/null
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-lightUpEffect.md
@@ -0,0 +1,80 @@
+# 图像渐亮效果
+
+设置组件的图像渐亮效果。
+
+> **说明:**
+>
+> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。此接口为系统接口。
+
+## 属性
+
+| 名称 | 参数类型 | 描述 |
+| -------- | -------- | -------- |
+| lightUpEffect | [number] | 设置组件图像亮起程度。
取值范围:[0,1]。
如果value等于0则图像为全黑,如果value等于1则图像为全亮效果。0到1之间数值越大,表示图像亮度越高。`value < 0` 或者 `value > 1`为异常情况,`value < 0`按0处理,`value > 1`按1处理。 |
+
+## 示例
+
+### 示例1
+```ts
+// xxx.ets
+@Entry
+@Component
+struct LightUpExample {
+ build() {
+ Stack() {
+ Text('This is the text content with letterSpacing 0.')
+ .letterSpacing(0)
+ .fontSize(12)
+ .border({ width: 1 })
+ .padding(10)
+ .width('50%')
+ .lightUpEffect(0.6)
+ }.alignContent(Alignment.Center).width("100%").height("100%")
+ }
+}
+
+```
+效果图如下:
+
+
+
+修改lightUpEffect参数值为0.2:
+
+
+
+去掉lightUpEffect的设置,效果如下:
+
+
+### 示例2
+
+```ts
+// xxx.ets
+@Entry
+@Component
+struct LightUpExample {
+ @State isLunar: boolean = false
+ private selectedDate: Date = new Date('2028-08-08')
+ build() {
+ Stack() {
+ DatePicker({
+ start: new Date('1970-1-1'),
+ end: new Date('2100-1-1'),
+ selected: this.selectedDate
+ })
+ .lunar(this.isLunar)
+ .onChange((value: DatePickerResult) => {
+ this.selectedDate.setFullYear(value.year, value.month, value.day)
+ console.info('select current date is: ' + JSON.stringify(value))
+ })
+ .lightUpEffect(0.6)
+
+ }.alignContent(Alignment.Center).width("100%").height("100%")
+ }
+}
+```
+
+
+
+去掉lightUpEffect的设置,效果如下:
+
+
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md
new file mode 100644
index 0000000000000000000000000000000000000000..d99b8e9f43e3f86d4831f4341bf72680d14f683b
--- /dev/null
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md
@@ -0,0 +1,76 @@
+# 图像边缘像素扩展效果
+
+设置组件的图像边缘像素扩展效果。
+
+> **说明:**
+>
+> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。此接口为系统接口。
+
+## 属性
+
+| 名称 | 参数类型 | 描述 |
+| -------- | -------- | -------- |
+| pixelStretchEffect | [PixelStretchEffectOptions](ts-types.md#PixelStretchEffectOptions) | 设置组件的图像边缘像素扩展距离。
参数`options`包括上下左右四个方向的边缘像素扩展距离。
**说明:**
1、如果距离为正值,表示向外扩展,放大原来图像大小。上下左右四个方向分别用边缘像素填充,填充的距离即为设置的边缘扩展的距离。
2、如果距离为负值,表示内缩,但是最终图像大小不变。内缩方式:1、图像根据`options`的设置缩小,缩小大小为四个方向边缘扩展距离的绝对值。2、图像用边缘像素扩展到原来大小。
3、对`options`的输入约束:1、上下左右四个方向的扩展统一为非正值或者非负值。即四个边同时向外扩或者内缩,方向一致。2、所有方向的输入均为百分比或者具体值,不支持百分比和具体值混用。3、所有异常情况下,显示为{0,0,0,0}效果,即跟原图保持一致。|
+
+## 示例
+
+### 示例1
+
+```ts
+// xxx.ets
+@Entry
+@Component
+struct PixelStretchExample {
+ build() {
+ Stack() {
+ Text('This is the text content with letterSpacing 0.')
+ .letterSpacing(0)
+ .fontSize(12)
+ .border({ width: 1 })
+ .padding(10)
+ .width('50%')
+ .pixelStretchEffect({top:10,left:10,right:10,bottom:10 })
+ }.alignContent(Alignment.Center).width("100%").height("100%")
+ }
+}
+
+```
+效果图如下:
+
+
+
+去掉pixelStretchEffect的设置,原图效果如下:
+
+
+
+对比发现,如果边缘扩展距离设置为正值,图像向外扩展了边缘距离。
+
+### 示例2
+
+基于示例1,现在把边缘扩展距离改为非正值。
+
+```ts
+// xxx.ets
+@Entry
+@Component
+struct PixelStretchExample {
+ build() {
+ Stack() {
+ Text('This is the text content with letterSpacing 0.')
+ .letterSpacing(0)
+ .fontSize(12)
+ .border({ width: 1 })
+ .padding(10)
+ .width('50%')
+ .pixelStretchEffect({top:-10,left:-10,right:-10,bottom:-10 })
+ }.alignContent(Alignment.Center).width("100%").height("100%")
+ }
+}
+```
+效果图如下:
+
+
+
+跟原图对比发现,效果图分两步实现:
1、原图大小缩小,缩小后的大小为原图大小减去像素
+收缩的距离。例如,原图大小为`100*100`,设置了`pixelStretchEffect({top:-10,left:-10,
+right:-10,bottom:-10 })`,则缩小后的大小为`(100-10-10)*(100-10-10)`,即`80*80`。
2、使用边缘像素扩展,将图像扩展为原图大小。
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sphericalEffect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sphericalEffect.md
new file mode 100644
index 0000000000000000000000000000000000000000..921a8085250cae49106d0c3c15ff148c747f8045
--- /dev/null
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sphericalEffect.md
@@ -0,0 +1,49 @@
+# 图像球面效果
+
+设置组件的图像球面效果。
+
+> **说明:**
+>
+> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。此接口为系统接口。
+
+## 属性
+
+| 名称 | 参数类型 | 描述 |
+| -------- | -------- | -------- |
+| sphericalEffect | [number] | 设置组件的图像球面化程度。
取值范围:[0,1]。
**说明:**
1、如果value等于0则图像保持原样,如果value等于1则图像为完全球面化效果。在0和1之间,数值越大,则球面化程度越高。
`value < 0 `或者` value > 1`为异常情况,`value < 0`按0处理,`value > 1`按1处理。
2、如果组件的图像使用异步加载,则不支持球面效果。例如Image组件默认使用异步加载,如果要使用球面效果,就要设置`syncLoad`为`true`,但是这种做法不推荐。`backgroundImage`也是使用异步加载,所以如果设置了`backgroundImage`,不支持球面效果。
3、如果组件设置了阴影,不支持球面效果。|
+
+## 示例
+
+### 示例1
+```ts
+// xxx.ets
+@Entry
+@Component
+struct SphericalEffectExample {
+ build() {
+ Stack() {
+ TextInput({ placeholder: "请输入变化范围百分比([0%,100%])"})
+ .width('50%')
+ .height(35)
+ .type(InputType.Number)
+ .enterKeyType(EnterKeyType.Done)
+ .caretColor(Color.Red)
+ .placeholderColor(Color.Blue)
+ .placeholderFont({
+ size: 20,
+ style: FontStyle.Italic,
+ weight: FontWeight.Bold
+ })
+ .sphericalEffect(0.5)
+ }.alignContent(Alignment.Center).width("100%").height("100%")
+ }
+}
+
+```
+效果图如下:
+
+
+
+去掉sphericalEffect的设置,效果如下:
+
+
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md
index 202bd9d425c7f583b5db8c075e6b3df57fc196f0..1ef393a59db3a5110c1510b8c4683812917fc0fa 100644
--- a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md
+++ b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md
@@ -186,7 +186,7 @@ The context does not exist.
请检查上下文对象是否可用。
-## 16000012 上一个Ability未启动完成,先缓存在队列中等待后续启动。
+## 16000017 上一个Ability未启动完成,先缓存在队列中等待后续启动。
**错误信息**
diff --git a/zh-cn/application-dev/reference/native-lib/Readme-CN.md b/zh-cn/application-dev/reference/native-lib/Readme-CN.md
index 6ab376d22cdee59e3d8c3ba5b1c1a702012b1b92..f57483012a11397f554c2a01aad7c0872241faec 100644
--- a/zh-cn/application-dev/reference/native-lib/Readme-CN.md
+++ b/zh-cn/application-dev/reference/native-lib/Readme-CN.md
@@ -5,4 +5,5 @@
- 附录
- [Native api中没有导出的符号列表](third_party_libc/musl-peculiar-symbol.md)
- [Native api中导出的EGL符号列表](third_party_opengl/egl-symbol.md)
- - [Native api中导出的OpenGL ES 3.0符号列表](third_party_opengl/openglesv3-symbol.md)
\ No newline at end of file
+ - [Native api中导出的OpenGL ES 3.0符号列表](third_party_opengl/openglesv3-symbol.md)
+ - [Native api中支持的OpenSL ES接口列表](third_party_opensles/opensles.md)
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/native-lib/third_party_libc/musl.md b/zh-cn/application-dev/reference/native-lib/third_party_libc/musl.md
index 3fc992e9a9b9a6c2096eec828766d270f4fb829c..611b370f28a5a3251c516bae6eff9aac450a1119 100644
--- a/zh-cn/application-dev/reference/native-lib/third_party_libc/musl.md
+++ b/zh-cn/application-dev/reference/native-lib/third_party_libc/musl.md
@@ -31,7 +31,7 @@ libdl:dlopen等动态链接器接口。
C标准函数库是在C语言程序设计中,所有符合标准的头文件的集合,以及常用的函数库实现程序(如I/O输入输出和字符串控制)。
-**musl**
+**musl**
[native api中没有导出的符号列表](musl-peculiar-symbol.md)
@@ -53,6 +53,10 @@ C++11、C++14标准已完全支持,C++17和C++20标准正在完善。
[OpenSL ES](https://www.khronos.org/registry/OpenSL-ES/)是一个嵌入式跨平台的音频处理库。
+**支持的能力**
+
+[Native api中支持的OpenSL ES接口列表](../third_party_opensles/opensles.md)
+
## zlib
[Zlib](https://zlib.net/)是基于C/C++语言实现的一个通用的数据压缩库。
@@ -75,4 +79,6 @@ OpenGL ES 3.0
**标准库中导出的符号列表**
-[native api中导出的OpenGL ES 3.0符号列表](../third_party_opengl/openglesv3-symbol.md)
\ No newline at end of file
+[native api中导出的OpenGL ES 3.0符号列表](../third_party_opengl/openglesv3-symbol.md)
+
+
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/native-lib/third_party_opensles/opensles.md b/zh-cn/application-dev/reference/native-lib/third_party_opensles/opensles.md
new file mode 100644
index 0000000000000000000000000000000000000000..68ee1a999ca8455196707a29e6185af05b3f9cfb
--- /dev/null
+++ b/zh-cn/application-dev/reference/native-lib/third_party_opensles/opensles.md
@@ -0,0 +1,29 @@
+# Native api中支持的OpenSL ES接口列表
+
+## 简介
+
+OpenSL ES(Open Sound Library for Embedded System)即嵌入式音频加速标准。为开发者提供了标准化、高性能以及低响应时间的音频功能开发的对象和接口。相对于开源免费的OpenSL ES,OpenHarmony基于[OpenSL ES](https://www.khronos.org/opensles/) 1.0.1 API规范实现了部分Native API,相关接口开放情况介绍如下:
+
+## 支持的API
+
+|对象 |对外接口 |接口调用详情 |是否支持 |说明 |
+| ------------------ | -------------------- | -------------------------------------------------------------------------------------|----------| -------------------- |
+|SLEngineItf |CreateAudioPlayer |CreateAudioPlayer(SLEngineItf self, SLObjectItf *pPlayer, SLDataSource *pAudioSrc, SLDataSink *pAudioSnk, SLuint32 numInterfaces, const SLInterfaceID *pInterfaceIds, const SLboolean *pInterfaceRequired) |是 |创建音频播放机。 |
+|SLEngineItf |CreateAudioRecorder |reateAudioRecorder(SLEngineItf self, SLObjectItf *pRecorder, SLDataSource *pAudioSrc, SLDataSink *pAudioSnk, SLuint32 numInterfaces, const SLInterfaceID *pInterfaceIds, const SLboolean *pInterfaceRequired)|是 |创建音频录制器。 |
+|SLEngineItf |CreateAudioOutputMix |CreateOutputMix(SLEngineItf self, SLObjectItf *pMix, SLuint32 numInterfaces, const SLInterfaceID *pInterfaceIds, const SLboolean *pInterfaceRequired)|是 |创建混音器。 |
+|SLObjectItf |Realize |Realize(SLObjectItf self, SLboolean async) |是 |创建音频播放机。 |
+|SLObjectItf |getState |GetState(SLObjectItf self, SLuint32 *state) |是 |获取状态。 |
+|SLObjectItf |getInterface |GetInterface(SLObjectItf self, const SLInterfaceID iid, void *interface) |是 |获取接口。 |
+|SLObjectItf |Destroy |Destroy(SLObjectItf self) |是 |销毁对象。 |
+|SLOHBufferQueueItf |Enqueue |Enqueue(SLOHBufferQueueItf self, const void *buffer, SLuint32 size) |是 |将buffer加入实际队列中。|
+|SLOHBufferQueueItf |clear |Clear(SLOHBufferQueueItf self) |是 |释放buffer队列 |
+|SLOHBufferQueueItf |getState |GetState(SLOHBufferQueueItf self, SLOHBufferQueueState *state) |是 |获取BufferQueue状态。 |
+|SLOHBufferQueueItf |getBuffer |GetBuffer(SLOHBufferQueueItf self, SLuint8 **buffer, SLuint32 *size) |是 |获取buffer。 |
+|SLOHBufferQueueItf |RegisterCallback |RegisterCallback(SLOHBufferQueueItf self, SlOHBufferQueueCallback callback, void *pContext) |是 |注册回调函数。 |
+|SLPlayItf |SetPlayState |SetPlayState(SLPlayItf self, SLuint32 state) |是 |设置播放状态。 |
+|SLPlayItf |GetPlayState |GetPlayState(SLPlayItf self, SLuint32 *state) |是 |获取播放状态。 |
+|SLRecordItf |SetRecordState |SetRecordState(SLRecordItf self, SLuint32 state) |是 |设置录制状态。 |
+|SLRecordItf |GetRecordState |GetRecordState(SLRecordItf self, SLuint32 *pState) |是 |获取录制状态。 |
+|SLVolumeItf |SetVolumeLevel |SetVolumeLevel(SLVolumeItf self, SLmillibel *level) |是 |设置音量。 |
+|SLVolumeItf |GetVolumeLevel |GetVolumeLevel(SLVolumeItf self, SLmillibel level) |是 |获取音量。 |
+|SLVolumeItf |GetMaxVolumeLevel |GetMaxVolumeLevel(SLVolumeItf self, SLmillibel *maxLevel) |是 |获取最大音量。 |
\ No newline at end of file
diff --git a/zh-cn/device-dev/subsystems/Readme-CN.md b/zh-cn/device-dev/subsystems/Readme-CN.md
index ada771ceab4cca745ffee93a9455450bb83d278b..b39c84c5716a3521e6514f15dc638c9cc94ad221 100644
--- a/zh-cn/device-dev/subsystems/Readme-CN.md
+++ b/zh-cn/device-dev/subsystems/Readme-CN.md
@@ -38,7 +38,9 @@
- [音视频播放开发指导](subsys-multimedia-video-play-guide.md)
- [音视频录制开发指导](subsys-multimedia-video-record-guide.md)
- [公共基础库开发指导](subsys-utils-guide.md)
-- [AI框架开发指导](subsys-ai-aiframework-devguide.md)
+- AI服务
+ - [AI框架开发指导](subsys-ai-aiframework-devguide.md)
+ - [NNRt开发指导](subsys-ai-nnrt-guide.md)
- Sensor服务
- [Sensor服务概述](subsys-sensor-overview.md)
- [Sensor服务使用指导](subsys-sensor-guide.md)
diff --git a/zh-cn/device-dev/subsystems/figures/nnrt_arch_diagram.png b/zh-cn/device-dev/subsystems/figures/nnrt_arch_diagram.png
new file mode 100644
index 0000000000000000000000000000000000000000..d0a721c2156ddb3c0df79feec763a8dfe6680c5d
Binary files /dev/null and b/zh-cn/device-dev/subsystems/figures/nnrt_arch_diagram.png differ
diff --git a/zh-cn/device-dev/subsystems/figures/nnrt_dev_flow.png b/zh-cn/device-dev/subsystems/figures/nnrt_dev_flow.png
new file mode 100644
index 0000000000000000000000000000000000000000..ab008db12eaae364195d7097b02af5a6f624c325
Binary files /dev/null and b/zh-cn/device-dev/subsystems/figures/nnrt_dev_flow.png differ
diff --git a/zh-cn/device-dev/subsystems/subsys-ai-nnrt-guide.md b/zh-cn/device-dev/subsystems/subsys-ai-nnrt-guide.md
new file mode 100644
index 0000000000000000000000000000000000000000..d36d0755a47b526ff2210491de23201678b4c75c
--- /dev/null
+++ b/zh-cn/device-dev/subsystems/subsys-ai-nnrt-guide.md
@@ -0,0 +1,386 @@
+# NNRt设备开发指导
+
+## 概述
+
+### 功能简介
+
+NNRt(Neural Network Runtime,神经网络运行时)是面向AI领域的跨芯片推理计算运行时,作为中间桥梁连通上层AI推理框架和底层加速芯片,实现AI模型的跨芯片推理计算。
+
+NNRt开放了设备接口,芯片厂商通过设备接口将专有加速芯片接入NNRt,实现接入OpenHarmony的社区生态,以下将介绍芯片如何接入NNRt。
+
+### 基本概念
+在开发前,开发者需要先了解以下概念,以便更好地理解全文内容:
+
+- HDI(Hardware Device Interface):OpenHarmony硬件设备接口,定义系统中跨进程通信的接口,实现服务间的跨进程通信。
+- IDL(Interface Description Language):接口描述语言,是HDI接口的语言格式。
+
+### 约束与限制
+- 系统版本:OpenHarmony主干版本。
+- 开发环境:Ubuntu 18.04及以上。
+- 接入设备:具备AI计算能力的芯片。
+
+### 运作机制
+NNRt通过HDI接口实现与设备芯片的对接,由HDI接口实现跨进程通信。
+
+**图1** NNRt架构图
+
+
+
+整个架构主要分为三层,AI应用在应用层,AI推理框架和NNRt在系统层,设备服务在芯片层。AI应用如要使用专用加速芯片模型推理,需要经过AI推理框架和NNRt才能调用到底层专用加速芯片,而NNRt就是负责适配底层各种专用加速芯片,它开放了标准统一的设备接口,众多的第三方芯片设备都可以通过HDI接口接入OHOS。
+
+程序运行时,AI应用、AI推理框架、NNRt都在用户进程中,底层设备服务在服务进程中,NNRt根据HDI接口实现了HDI Client,服务端也需要根据HDI接口实现HDI Service,使得两个进程间能够跨进程通信。
+
+## NNRt开发指导
+
+### 场景介绍
+当需要将一款AI加速芯片接入NNRt的时候,可以参考下文,下文以rk3568芯片为例,展示rk3568 CPU如何通过HDI接口接入NNRt,并完成AI模型推理。
+> 依赖说明:该教程展示的rk3568 CPU接入NNRt并没有实际去写CPU的驱动,而是借用了Mindspore-Lite的CPU算子,故会依赖MindSpore-Lite的动态库以及头文件,实际开发时并不需要依赖MindSpore-Lite的任何库或者头文件。
+
+### 开发流程
+专用加速芯片接入NNRt的整体流程如下:
+
+**图2** 专用加速芯片接入NNRt流程
+
+
+
+### 开发步骤
+开发者具体可通过以下步骤实现芯片对接NNRt:
+1. 开源社区下载OpenHarmony的代码,编译drivers_interface部件,生成HDI接口的头文件。
+
+ 1. [下载源码](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md)。
+
+ 2. 编译接口IDL文件。
+ ```shell
+ ./build.sh --product-name productname –ccache --build-target drivers_interface_nnrt
+ ```
+ > productname为产品名称,此处为rk3568.
+
+ 编译完成后,在```out/rk3568/gen/drivers/interface/nnrt```目录下生成HDI头文件,默认语言类型为C++;若需要生成C类型的头文件,请在编译之前使用如下命令对```drivers/interface/nnrt/v1_0/BUILD.gn```文件中的```language```配置项进行设置。
+
+ ```shell
+ language = "c"
+ ```
+
+ 生成头文件目录如下所示:
+ ```text
+ out/rk3568/gen/drivers/interface/nnrt
+ └── v1_0
+ ├── drivers_interface_nnrt__libnnrt_proxy_1.0_external_deps_temp.json
+ ├── drivers_interface_nnrt__libnnrt_stub_1.0_external_deps_temp.json
+ ├── innrt_device.h # 设备接口头文件
+ ├── iprepared_model.h # 编译AI模型对象头文件
+ ├── libnnrt_proxy_1.0__notice.d
+ ├── libnnrt_stub_1.0__notice.d
+ ├── model_types.cpp # AI模型结构定义实现文件
+ ├── model_types.h # AI模型结构定义头文件
+ ├── nnrt_device_driver.cpp # 设备驱动实现参考样例
+ ├── nnrt_device_proxy.cpp
+ ├── nnrt_device_proxy.h
+ ├── nnrt_device_service.cpp # 设备服务端实现参考样例
+ ├── nnrt_device_service.h # 设备服务端头文件
+ ├── nnrt_device_stub.cpp
+ ├── nnrt_device_stub.h
+ ├── nnrt_types.cpp # 数据类型定义实现文件
+ ├── nnrt_types.h # 数据类型定义头文件
+ ├── node_attr_types.cpp # AI模型算子属性定义实现文件
+ ├── node_attr_types.h # AI模型算子属性定义
+ ├── prepared_model_proxy.cpp
+ ├── prepared_model_proxy.h
+ ├── prepared_model_service.cpp # 编译AI模型对象服务端实现参考样例
+ ├── prepared_model_service.h # 编译AI模型对象服务端头文件
+ ├── prepared_model_stub.cpp
+ └── prepared_model_stub.h
+ ```
+
+2. 实现HDI服务。
+
+ 1. 在drivers/peripheral目录下新建开发目录,用于HDI服务开发,开发目录结构如下所示。
+ ```text
+ drivers/peripheral/nnrt
+ ├── BUILD.gn # 代码编译脚本文件
+ ├── bundle.json
+ └── hdi_cpu_service # 自定义目录
+ ├── BUILD.gn # 代码编译脚本文件
+ ├── include
+ │ ├── nnrt_device_service.h # 设备服务端头文件
+ │ ├── node_functions.h # 非必须,由具体实现决定
+ │ ├── node_registry.h # 非必须,由具体实现决定
+ │ └── prepared_model_service.h # 编译AI模型对象服务端头文件
+ └── src
+ ├── nnrt_device_driver.cpp # 设备驱动实现文件
+ ├── nnrt_device_service.cpp # 设备服务端实现文件
+ ├── nnrt_device_stub.cpp # 非必须,由具体实现决定
+ ├── node_attr_types.cpp # 非必须,由具体实现决定
+ ├── node_functions.cpp # 非必须,由具体实现决定
+ ├── node_registry.cpp # 非必须,由具体实现决定
+ └── prepared_model_service.cpp # 编译AI模型对象服务端实现文件
+ ```
+
+ 2. 实现设备驱动,无特殊需求可直接使用步骤1中生成的nnrt_device_driver.cpp文件,否则根据具体驱动开发。
+ 3. 实现服务接口,可参考nnrt_device_service.cpp和prepared_model_service.cpp实现文件,接口定义可以参考[NNRt的HDI接口定义](https://gitee.com/openharmony/drivers_interface/tree/master/nnrt)。
+
+ 4. 编译驱动和服务的实现文件为共享库。
+
+ 在```drivers/peripheral/nnrt/hdi_cpu_service/```下新建```BUILD.gn```文件,文件内容如下所示,相关参数配置内容可参考[Build教程](https://gitee.com/openharmony/build).
+
+ ```shell
+ import("//build/ohos.gni")
+ import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
+
+ ohos_shared_library("libnnrt_service_1.0") {
+ include_dirs = []
+ sources = [
+ "src/nnrt_device_service.cpp",
+ "src/prepared_model_service.cpp",
+ "src/node_registry.cpp",
+ "src/node_functions.cpp",
+ "src/node_attr_types.cpp"
+ ]
+ public_deps = [ "//drivers/interface/nnrt/v1_0:nnrt_idl_headers" ]
+ external_deps = [
+ "hdf_core:libhdf_utils",
+ "hiviewdfx_hilog_native:libhilog",
+ "ipc:ipc_single",
+ "c_utils:utils",
+ ]
+
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_nnrt"
+ }
+
+ ohos_shared_library("libnnrt_driver") {
+ include_dirs = []
+ sources = [ "src/nnr_device_driver.cpp" ]
+ deps = [ "//drivers/peripheral/nnrt/hdi_cpu_service:libnnrt_service_1.0" ]
+
+ external_deps = [
+ "hdf_core:libhdf_host",
+ "hdf_core:libhdf_ipc_adapter",
+ "hdf_core:libhdf_utils",
+ "hiviewdfx_hilog_native:libhilog",
+ "ipc:ipc_single",
+ "c_utils:utils",
+ ]
+
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_nnrt"
+ }
+
+ group("hdf_nnrt_service") {
+ deps = [
+ ":libnnrt_driver",
+ ":libnnrt_service_1.0",
+ ]
+ }
+ ```
+
+ 将```group("hdf_nnrt_service")```添加到```drivers/peripheral/nnrt/BUILD.gn```文件中,以便在更上目录层级就能引用。
+ ```shell
+ if (defined(ohos_lite)) {
+ group("nnrt_entry") {
+ deps = [ ]
+ }
+ } else {
+ group("nnrt_entry") {
+ deps = [
+ "./hdi_cpu_service:hdf_nnrt_service",
+ ]
+ }
+ }
+ ```
+
+ 新建```drivers/peripheral/nnrt/bundle.json```用于定义新增的```drivers_peripheral_nnrt```部件。
+ ```json
+ {
+ "name": "drivers_peripheral_nnrt",
+ "description": "Neural network runtime device driver",
+ "version": "3.2",
+ "license": "Apache License 2.0",
+ "component": {
+ "name": "drivers_peripheral_nnrt",
+ "subsystem": "hdf",
+ "syscap": [""],
+ "adapter_system_type": ["standard"],
+ "rom": "1024KB",
+ "ram": "2048KB",
+ "deps": {
+ "components": [
+ "ipc",
+ "hdf_core",
+ "hiviewdfx_hilog_native",
+ "c_utils"
+ ],
+ "third_part": [
+ "bounds_checking_function"
+ ]
+ },
+ "build": {
+ "sub_component": [
+ "//drivers/peripheral/nnrt:nnrt_entry"
+ ],
+ "test": [
+ ],
+ "inner_kits": [
+ ]
+ }
+ }
+ }
+ ```
+
+3. 声明HDI服务。
+
+ 在对应产品的uhdf hcs配置文件中声明用户态驱动与服务,例如,针对rk3568服务需要在```vendor/hihope/rk3568/hdf_config/uhdf/device_info.hcs```文件中新增如下配置:
+ ```text
+ nnrt :: host {
+ hostName = "nnrt_host";
+ priority = 50;
+ uid = "";
+ gid = "";
+ caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
+ nnrt_device :: device {
+ device0 :: deviceNode {
+ policy = 2;
+ priority = 100;
+ moduleName = "libnnrt_driver.z.so";
+ serviceName = "nnrt_device_service";
+ }
+ }
+ }
+ ```
+ > 注意:修改hcs文件需要删除out目录重新编译,才能生效。
+
+4. 配置host进程用户和组。
+
+ 对于新增的nnrt_host进程的场景,需要配置对应进程的用户ID和组ID。 进程的用户ID在文件```base/startup/init/services/etc/passwd```中配置,进程的组ID在文件```base/startup/init/services/etc/group```中配置。
+ ```text
+ # 在base/startup/init/services/etc/passwd新增
+ nnrt_host:x:3311:3311:::/bin/false
+
+ # 在base/startup/init/services/etc/group新增
+ nnrt_host:x:3311:
+ ```
+
+5. SeLinux配置。
+
+ OHOS已经开启SELinux特性,需要对新增的进程和服务配置相应的SELinux规则,用于运行host进程启动访问某些资源、发布HDI服务。
+
+ 1. 在```base/security/selinux/sepolicy/ohos_policy/drivers/adapter/vendor/type.te```文件中配置nnrt_host进程安全上下文,新增配置如下:
+ ```text
+ # 新增配置
+ type nnrt_host, hdfdomain, domain;
+ ```
+ > nnrt_host为上文配置的进程名称。
+
+ 2. 由于SeLinux是白名单访问的权限机制,需要根据实际权限需求配置,将服务启动起来之后,通过以下dmesg命令可能查看avc告警,
+ avc告警会给出缺少的权限,SeLinux的配置也可以参考[OpenHarmony SeLinux子系统的说明](https://gitee.com/openharmony/security_selinux/blob/master/README.md)。
+ ```shell
+ hdc_std shell
+ dmesg | grep nnrt
+ ```
+
+ 3. 新建nnrt_host.te配置文件,将权限配置到nnrt_host.te文件中。
+ ```shell
+ # 创建nnrt文件夹
+ mkdir base/security/selinux/sepolicy/ohos_policy/drivers/peripheral/nnrt
+
+ # 创建vendor文件夹
+ mkdir base/security/selinux/sepolicy/ohos_policy/drivers/peripheral/nnrt/vendor
+
+ # 创建nnrt_host.te文件
+ touch base/security/selinux/sepolicy/ohos_policy/drivers/peripheral/nnrt/vendor/nnrt_host.te
+ ```
+
+ 4. 将所需的权限写入nnrt_host.te文件中,比如:
+ ```text
+ allow nnrt_host dev_hdf_kevent:chr_file { ioctl };
+ allow nnrt_host hilog_param:file { read };
+ allow nnrt_host sh:binder { transfer };
+ allow nnrt_host dev_ashmem_file:chr_file { open };
+ allow sh nnrt_host:fd { use };
+ ```
+
+6. 删除out目录编译整个系统。
+ ```shell
+ # 删除out目录
+ rm -rf ./out
+
+ # 编译
+ ./build.sh --product-name rk3568 –ccache --jobs=4
+ ```
+
+
+### 调测验证
+服务开发完成后,可以使用XTS用例验证基本功能和兼容性,开发者可通过以下步骤进行验证:
+1. 编译NNRt的hats用例,用例在```test/xts/hats/hdf/nnrt```目录下。
+ ```shell
+ # 进入hats目录
+ cd test/xts/hats
+
+ # 编译hats测试用例
+ ./build.sh suite=hats system_size=standard --product-name rk3568
+
+ # 回到代码根目录
+ cd -
+ ```
+ 编译好的测试用例会输出到相对代码根目录的```out/rk3568/suites/hats/testcases/HatsHdfNnrtFunctionTest```路径下。
+
+2. 将测试用例push到设备上。
+ ```shell
+ # 将测试用例可执行文件推送到设备上,HatsHdfNnrtFunctionTest是测试用例可执行文件。
+ hdc_std file send out/rk3568/suites/hats/testcases/HartsHdfNnrtFunctionTest /data/local/tmp/
+
+ # 给测试用例可执行文件加上权限。
+ hdc_std shell "chmod +x /data/local/tmp/HatsHdfNnrtFunctionTest"
+ ```
+
+3. 执行用例并查看结果。
+ ```shell
+ # 执行测试用例
+ hdc_std shell "/data/local/tmp/HatsHdfNnrtFunctionTest"
+ ```
+
+ 所有hats用例执行成功,可以看到测试报告通过47个用例,说明服务通过了兼容性测试。
+ ```text
+ ...
+ [----------] Global test environment tear-down
+ Gtest xml output finished
+ [==========] 47 tests from 3 test suites ran. (515 ms total)
+ [ PASSED ] 47 tests.
+ ```
+
+### 开发实例
+完整Demo代码可以参考[社区实现](https://gitee.com/openharmony/ai_neural_network_runtime/tree/master/example/drivers)。
+1. 拷贝```example/driver/nnrt```目录到```drivers/peripheral```路径下。
+ ```shell
+ cp -r example/driver/nnrt drivers/peripheral
+ ```
+2. 补充bundle.json文件到```drivers/peripheral/nnrt```,bundle.json参考本教程上面的[开发步骤](#开发步骤)章节。
+3. 由于Demo依赖MindSpore-Lite CPU算子,故需要添加MindSpore-Lite依赖文件。
+ - 下载MindSpore-Lite的头文件,[mindspore 1.5.0](https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0/MindSpore/lite/release/linux/mindspore-lite-1.5.0-linux-x64.tar.gz)。
+ - 在```drivers/peripheral/nnrt```目录下新建mindspore目录,用于存放mindspore依赖库和头文件。
+ ```shell
+ mkdir drivers/peripheral/nnrt/mindspore
+ ```
+ - 解压mindspore-lite-1.5.0-linux-x64.tar.gz文件,将```runtime/include```目录拷贝到```drivers/peripheral/nnrt/mindspore```目录下。
+ - Demo还依赖mindspore的schema文件。
+ ```shell
+ # 创建mindspore_schema目录
+ mkdir drivers/peripheral/nnrt/hdi_cpu_service/include/mindspore_schema
+
+ # 拷贝mindspore schema文件
+ cp third_party/mindspore/mindspore/lite/schema/* drivers/peripheral/nnrt/hdi_cpu_service/include/mindspore_schema/
+ ```
+ - 编译MindSpore-Lite的动态库,并将动态库放到mindspore目录下。
+ ```shell
+ # 编译mindspore动态库
+ ./build.sh --product-name rk3568 -ccaache --jobs 4 --build-target mindspore_lib
+
+ # 将mindspore动态库
+ mkdir drivers/peripheral/nnrt/mindspore/mindspore
+
+ # 将mindspore动态拷贝到drivers/peripheral/nnrt/mindspore/mindspore。
+ cp out/rk3568/package/phone/system/lib/libmindspore-lite.huawei.so drivers/peripheral/nnrt/mindspore/mindspore/
+ ```
+ 4. 其他配置请参考本教程上面的[开发步骤](#开发步骤)章节。
\ No newline at end of file
diff --git a/zh-cn/device-dev/subsystems/subsys-build-component-building-rules.md b/zh-cn/device-dev/subsystems/subsys-build-component-building-rules.md
index 7b4c0ea74e43d12e29c0eefe31bd87274e6ac047..e7333059216749fcd6cac36e31d4e7e3da3b8448 100644
--- a/zh-cn/device-dev/subsystems/subsys-build-component-building-rules.md
+++ b/zh-cn/device-dev/subsystems/subsys-build-component-building-rules.md
@@ -105,7 +105,7 @@ bundle.json是定义部件的描述文件,包含了部件的根目录、名称
| 字段 | 类型 | 看护手段 |
|---|---|---|
-|name|string。部件的HPM(鸿蒙包管理器)包名称,必填。命名规则:@{organization}/{component_name}。"component_name"为部件的名称,须满足规则1.1。|静态检查|
+|name|string。部件的HPM(OpenHarmony包管理器)包名称,必填。命名规则:@{organization}/{component_name}。"component_name"为部件的名称,须满足规则1.1。|静态检查|
|version|string。部件版本号,必填,命名和升级跟随OpenHarmony版本号。|静态检查|
|destPath|string。部件源码的根目录,必填。部件的根目录须独立唯一,不允许存在多个根目录。|静态检查|
|component:name|string。部件名,必填。须满足规则1.1。|静态检查|
diff --git a/zh-cn/device-dev/subsystems/subsys-security-huks-guide.md b/zh-cn/device-dev/subsystems/subsys-security-huks-guide.md
index e019d626238f9516e78fc512228e79b7facdd9ff..606c7df8fa0bcce378ca4e234d4df3b622f7e665 100644
--- a/zh-cn/device-dev/subsystems/subsys-security-huks-guide.md
+++ b/zh-cn/device-dev/subsystems/subsys-security-huks-guide.md
@@ -84,6 +84,7 @@ HUKS Core作为向应用提供密钥库能力的基础,包括密钥管理及
| [HuksHdiGetKeyProperties()](#hukshdigetkeyproperties) | 获取密钥属性。 |无 | getKeyProperties(keyAlias: string, options: HuksOptions)|
| [HuksHdiAttestKey()](#hukshdiattestkey) | 获取密钥证书。 |出参要遵循certChain格式 | attestKey(keyAlias: string, options: HuksOptions)|
| [HuksHdiExportChipsetPlatformPublicKey()](#hukshdiexportchipsetplatformpublickey) | 导出芯片平台级密钥对的公钥。 | 出参为ECC P256的x y轴值裸数据,各32字节 | 无 |
+| [HuksHdiUpgradeKey()](#hukshdiupgradekey) | 升级密钥文件。 | 无 | 无 |
- - -
@@ -602,6 +603,40 @@ HUKS Core的初始化,包括锁,加密算法库,authtoken key和根密钥
- - -
+#### HuksHdiUpgradeKey
+
+**接口描述**
+
+升级密钥文件。当密钥文件版本号小于最新版本号时,触发该升级能力。
+
+**接口原型**
+int32_t (*HuksHdiUpgradeKey)(const struct HksBlob *oldKey, const struct HksParamSet *paramSet, struct HksBlob *newKey);
+
+
+ 参数说明
+
+ const struct HksBlob *oldKey
+ 待升级的密钥文件数据
+
+ const struct HksParamSet *paramSet
+ 升级密钥文件数据的参数
+
+ struct HksBlob *newKey
+ 出参,升级后的密钥文件数据
+
+
+
+
+
+ 返回值
+
+ - HKS_SUCCESS:成功
+
+ - 其他:失败
+
+
+- - -
+
### 开发步骤
HDI接口到HUKS Core的适配在以下目录中:
diff --git a/zh-cn/device-dev/website.md b/zh-cn/device-dev/website.md
index 8585b5294294a8c3a86b0fc73f69997332486bd2..acf6bc882e0f63f45e16b7ecf0c2499d9cf0ca18 100644
--- a/zh-cn/device-dev/website.md
+++ b/zh-cn/device-dev/website.md
@@ -417,7 +417,9 @@
- [音视频播放开发指导](subsystems/subsys-multimedia-video-play-guide.md)
- [音视频录制开发指导](subsystems/subsys-multimedia-video-record-guide.md)
- [公共基础库开发指导](subsystems/subsys-utils-guide.md)
- - [AI框架开发指导](subsystems/subsys-ai-aiframework-devguide.md)
+ - AI服务
+ - [AI框架开发指导](subsystems/subsys-ai-aiframework-devguide.md)
+ - [NNRt开发指导](subsystems/subsys-ai-nnrt-guide.md)
- Sensor服务
- [Sensor服务概述](subsystems/subsys-sensor-overview.md)
- [Sensor服务使用指导](subsystems/subsys-sensor-guide.md)
diff --git a/zh-cn/readme/ARK-Runtime-Subsystem-zh.md b/zh-cn/readme/ARK-Runtime-Subsystem-zh.md
index 514bbb14842b9aa7846e18e4aa209d2b699f86bd..109c85f387afb3bf745110d453911ed7e8442452 100644
--- a/zh-cn/readme/ARK-Runtime-Subsystem-zh.md
+++ b/zh-cn/readme/ARK-Runtime-Subsystem-zh.md
@@ -8,7 +8,7 @@
## 简介
-方舟编译器\(ArkCompiler\)是为支持多种编程语言、多种芯片平台的联合编译、运行而设计的统一编译运行时平台。它支持包括动态类型和静态类型语言在内的多种编程语言,如JS、TS、ArkTS;它是支撑鸿蒙系统成为打通手机、PC、平板、电视、车机和智能穿戴等多种设备的操作系统的编译运行时底座。
+方舟编译器\(ArkCompiler\)是为支持多种编程语言、多种芯片平台的联合编译、运行而设计的统一编译运行时平台。它支持包括动态类型和静态类型语言在内的多种编程语言,如JS、TS、ArkTS;它是支撑OpenHarmony系统成为打通手机、PC、平板、电视、车机和智能穿戴等多种设备的操作系统的编译运行时底座。
ArkCompiler主要分成两个部分:编译工具链与运行时.
@@ -57,7 +57,7 @@ ArkCompiler运行时直接运行字节码文件,实现对应语言规范的语
- 原生支持TypeScript:
ECMAScript规范没有提供并发语义表述;业界引擎,如浏览器或者Node.js,通常会提供基于Actor并发模型的Worker API来支持多线程开发。Actor模型下执行体之间不共享任何数据对象,通过消息机制进行通信。因此Web引擎或者Node.js引擎的Worker都有启动速度慢、内存占用高这些缺陷。 针对这些缺陷,ArkCompiler的运行时已经实现了Actor实例中的不可变或者不易变的对象(方法和字节码)的共享,较大程度地优化了Actor的启动性能和启动内存。
- 方舟编译运行时不只提供了业界通用的Worker API,还提供了TaskPool作为并发API的增强。TaskPool是一个支持优先级调度、工作线程自动扩缩容的任务池功能库。开发者无需关心并发实例的生命周期,也无需关心任务负载变化时需要创建或者销毁并发实例,极大地简化了高性能多线程鸿蒙应用的开发。
+ 方舟编译运行时不只提供了业界通用的Worker API,还提供了TaskPool作为并发API的增强。TaskPool是一个支持优先级调度、工作线程自动扩缩容的任务池功能库。开发者无需关心并发实例的生命周期,也无需关心任务负载变化时需要创建或者销毁并发实例,极大地简化了高性能多线程OpenHarmony应用的开发。
- 安全
@@ -75,7 +75,7 @@ ArkCompiler运行时直接运行字节码文件,实现对应语言规范的语
## 使用指南
-[方舟运行时使用指南](https://gitee.com/openharmony/arkcompiler_ets_runtime/blob/master/docs/ARK-Runtime-Usage-Guide-zh.md)
+[方舟运行时使用指南](https://gitee.com/openharmony/arkcompiler_ets_runtime/blob/master/docs/README_zh.md)
## 相关仓
diff --git a/zh-cn/third-party-components/npm-third-party-guide.md b/zh-cn/third-party-components/npm-third-party-guide.md
index 22be4e935cf4b4388efdb3f4c443ff4ca7ad7c29..60222a480c852f19216688d99dda1dd9822005cc 100644
--- a/zh-cn/third-party-components/npm-third-party-guide.md
+++ b/zh-cn/third-party-components/npm-third-party-guide.md
@@ -1,7 +1,7 @@
# OpenHarmony JS和TS三方组件使用指导
## OpenHarmony JS和TS三方组件介绍
-OpenHarmony JS和TS三方组件使用的是OpenHarmony静态共享包,即HAR(Harmony Archive),可以包含js/ts代码、c++库、资源和配置文件。通过HAR,可以实现多个模块或者多个工程共享ArkUI组件、资源等相关代码。HAR不同于HAP,不能独立安装运行在设备上,只能作为应用模块的依赖项被引用。
+OpenHarmony JS和TS三方组件是以OpenHarmony npm包的形式,在传统的npm三方组件的基础上,定义了OpenHarmony npm共享包特定的工程结构和配置文件,支持OpenHarmony页面组件相关API、资源的调用。通过OpenHarmony npm包,可以实现多个模块或者多个工程共享OpenHarmony页面、资源等相关代码。前往[npm官方文档](https://docs.npmjs.com/about-npm),可以了解和掌握npm的基础功能和机制。
@@ -11,164 +11,41 @@ OpenHarmony JS和TS三方组件使用的是OpenHarmony静态共享包,即HAR(H
-2. 访问[OpenHarmony官网](https://growing.openharmony.cn/mainPlay/tpc),通过类型,分类,以及关键字搜索需要的三方组件。
+2. 访问[OpenHarmony官网](https://www.openharmony.cn/mainPlay/tpc),通过类型,分类,以及关键字搜索需要的三方组件。

## 安装并使用OpenHarmony JS和TS语言的三方组件
-引用三方HAR,包括从仓库进行安装和从本地库模块中进行安装两种方式。
-
-**引用仓库安装的HAR**
-
-引用ohpm仓中的HAR,首先需要设置三方HAR的仓库信息,DevEco Studio默认仓库地址是"https://repo.harmonyos.com/ohpm/",如果您想设置自定义仓库,请在DevEco Studio的Terminal窗口执行如下命令进行设置(执行命令前,请确保将DevEco Studio中ohpm安装地址配置在“环境变量-系统变量-PATH”中):
-```
-ohpm config set registry=your_registry1,your_registry2
-```
-说明:ohpm支持多个仓库地址,采用英文逗号分隔。
-然后通过如下两种方式设置三方包依赖信息:
- - 方式一:在Terminal窗口中,执行如下命令安装三方包,DevEco Studio会自动在工程的oh-package.json5中自动添加三方包依赖。
-```
-ohpm install @ohos/lottie --save
-```
- - 方式二:在工程的oh-package.json5中设置三方包依赖,配置示例如下:
-```
-"dependencies": { "@ohos/lottie": "^2.0.0"}
-```
-依赖设置完成后,需要执行ohpm install命令安装依赖包,依赖包会存储在工程的oh_modules目录下。
-```
-ohpm install
-```
-
-**引用本地库模块的文件和资源**
-
-- 方式一:在Terminal窗口中,执行如下命令进行安装,并会在oh-package5.json中自动添加依赖。
-```
-ohpm install ../library --save
-```
-- 方式二:在工程的oh-package.json5中设置三方包依赖,配置示例如下:
-```
-"dependencies": {
- "@ohos/library": "file:../library"
-}
-```
-依赖设置完成后,需要执行ohpm install命令安装依赖包,依赖包会存储在工程的oh_modules目录下。
-```
-ohpm install
-```
-
-> **说明:**
->
-> 在引用OpenHarmony HAR时,请注意以下事项
->- 当前只支持在模块和工程下的oh-package.json5文件中声明dependencies依赖,才会被当做OpenHarmony依赖使用,并在编译构建过程中进行相应的处理。
->- 引用的模块的compileSdkVersion不能低于其依赖的OpenHarmony ohpm三方包(可在oh_modules目录下,找到引用的ohpm包的src > main > module.json5 中查看)。
-
-
-
-### 引用OpenHarmony HAR hml页面
-在JS工程范式中,组件功能由hml承载,开发者可以在JS工程的hml页面通过标签来引入OpenHarmony HAR中的共享hml页面,示例如下:
-```
-
-```
-其中,@ohos/library为OpenHarmony HAR的包名,hml页面的路径为OpenHarmony HAR中的相对路径。
-随后便可以通过设置的name来使用该element元素,以引用OpenHarmony HAR中的hml页面,示例如下:
-```typescript
-
-
-
-
-
- {{ $t('strings.hello') }} {{ title }}
-
-
-```
-### 引用OpenHarmony HAR ArkTS页面
-ArkTS是TypeScript的扩展,因此导出和引入的语法与TypeScript一致。在OpenHarmony ohpm模块中,可以通过export导出ArkTS页面,示例如下:
-```typescript
-// library/src/main/ets/components/MainPage/MainPage.ets
-@Entry
-@Component
-export struct MainPage {
- @State message: string = 'Hello World'
- build() {
- Row() {
- Column() {
- Text(this.message)
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- }
- .width('100%')
- } .height('100%')
- }
-}
-```
-然后在其它模块中通过import引入导出的ArkTS页面,示例如下所示:
-```typescript
-// entry/MainAbility/pages/index.ets
-
-import { MainPage } from "@ohos/library"
-@Entry
-@Component
-struct Index {
- @State message: string = 'Hello World'
- build() {
- Column() {
- MainPage()
- Row() {
- Text(this.message)
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- }
- .width('100%')
- }
- .height('10%')
- }
-}
-```
-引用OpenHarmony HAR内ts/js方法ts/js方法的导出和引用,与ArkTS页面的引用相同,即在OpenHarmony ohpm模块中,可以通过export导出ts/js方法,示例如下所示:
-```typescript
-// library/index.js
-export function func() {
- return "[ohpm] func1";
-}
-```
-然后在其它的ts/js页面中,通过import引入导出的ts/js方法,示例如下所示:
-```typescript
-// entry/src/main/js/MainAbility/pages/index/index.js
-import {func} from "@ohos/library"
-export default {
- data: {
- title: ""
- },
- onInit() {
- this.title = func();
- }
-}
-```
-引用OpenHarmony HAR内资源支持在OpenHarmony ohpm模块和依赖OpenHarmony ohpm的模块中引用OpenHarmony ohpm模块内的资源。例如在OpenHarmony ohpm模块的scr/main/resources里添加字符串资源(在string.json中定义,name:hello_ohpm)和图片资源(icon_ohpm.png)。然后在Entry模块中引用该字符串资源和图片资源的示例如下:
-当前暂不支持类Web范式引用i18n文件中的国际化资源。
-```typescript
-// entry/src/main/ets/MainAbility/pages/index.ets
-@Entry
-@Component
-struct Index {
- @State message: string = 'Hello World'
- build() {
- Column() {
- Row() {
- Text($r("app.string.hello_ohpm")) // 字符串资源
- .fontSize(40)
- .fontWeight(FontWeight.Bold)
- }
- .width('50%')
- Image($r("app.media.icon_ohpm")) // 图片资源
- }
- .height('100%')
+在应用开发的过程中,JS和TS语言的三方组件,通常以源码或OpenHarmony npm包的方式被引入使用。按照以下步骤即可将OpenHarmony npm包引入应用并使用,源码的具体引入及使用请参考各三方组件README.md指导介绍。
+
+1. 配置OpenHarmony npm环境,详情请参考安装教程 [如何安装OpenHarmony npm包](https://gitee.com/openharmony-tpc/docs/blob/master/OpenHarmony_npm_usage.md)。
+
+2. 在Terminal项目终端中,进入entry目录,并执行目标组件命令进行安装。具体的下载命令详见OpenHarmony官网该三方组件的“下载安装“模块。
+
+ 以安装[vcard三方组件](https://growing.openharmony.cn/mainPlay/libraryMaps/vcard_595)为例,找到“下载安装”模块获取其安装命令,并执行该命令安装:
+
+ 
+
+ 
+
+3. 下载完成后在项目文件下自动生成node_modules文件,下载的三方库即node_modules目录下的@ohos\VCard。
+
+ 
+
+4. 在package.json中会自动添加如下依赖:
+
+ ```
+ "dependencies": {
+ "@ohos/vcard": "^2.0.5"
}
-}
-```
-在编译构建HAP中,DevEco Studio会从HAP模块及依赖的模块中收集资源文件,如果不同模块的相同限定词目录下的资源文件出现重名冲突时,DevEco Studio会按照以下优先级进行覆盖(优先级由高到低):
-- AppScope(仅API 9的Stage模型支持)
-- HAP包自身模块
-- 依赖的OpenHarmonyHarmony ohpm模块
\ No newline at end of file
+ ```
+
+5. 在需要使用该组件的文件中导入组件。
+
+ 
+
+6. 导入组件后直接使用方法即可。
+
+ 
\ No newline at end of file
diff --git a/zh-cn/third-party-components/npm-usage1.png b/zh-cn/third-party-components/npm-usage1.png
new file mode 100644
index 0000000000000000000000000000000000000000..9dc9a72717182136e77d620c90e45669c4059043
Binary files /dev/null and b/zh-cn/third-party-components/npm-usage1.png differ
diff --git a/zh-cn/third-party-components/npm-usage2.png b/zh-cn/third-party-components/npm-usage2.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce9e34ec18125ff473ad48667808081adc1a95d7
Binary files /dev/null and b/zh-cn/third-party-components/npm-usage2.png differ
diff --git a/zh-cn/third-party-components/npm-usage3.png b/zh-cn/third-party-components/npm-usage3.png
new file mode 100644
index 0000000000000000000000000000000000000000..66b6a14069cec3caaa42c0007f7b12ff09773f6f
Binary files /dev/null and b/zh-cn/third-party-components/npm-usage3.png differ
diff --git a/zh-cn/third-party-components/npm-usage4.png b/zh-cn/third-party-components/npm-usage4.png
new file mode 100644
index 0000000000000000000000000000000000000000..8cd881a7ddf90aed5570411c943794829c2fa24d
Binary files /dev/null and b/zh-cn/third-party-components/npm-usage4.png differ
diff --git a/zh-cn/third-party-components/npm-usage5.png b/zh-cn/third-party-components/npm-usage5.png
new file mode 100644
index 0000000000000000000000000000000000000000..ec7f772f86dad4deb5f061f6e7cf6ac41748a225
Binary files /dev/null and b/zh-cn/third-party-components/npm-usage5.png differ
diff --git a/zh-cn/third-party-components/third-party-components-introduction.md b/zh-cn/third-party-components/third-party-components-introduction.md
index aaa89c4fac1bb47e7689a963c46e8c62cc81e18a..31f1ab1bfd795ff7b8154455a16d59ca234cd494 100644
--- a/zh-cn/third-party-components/third-party-components-introduction.md
+++ b/zh-cn/third-party-components/third-party-components-introduction.md
@@ -1,6 +1,6 @@
# OpenHarmony三方组件
-OpenHarmony三方组件,是经过验证可在OpenHarmony系统上可重复使用的软件组件,可帮助开发者快速开发OpenHarmony系统或应用。根据其开发语言分为了2种,一种是使用JavaScript和TypeScript语言的三方组件,通常以源码或OpenHarmony HAR的方式引入,在应用开发中使用。另一种是C和C++语言的三方组件,通常以源码或OpenHarmony hpm包的方式引入,在应用开发中以NAPI的方式使用,或直接编译在OpenHarmony操作系统镜像中。
+OpenHarmony三方组件,是经过验证可在OpenHarmony系统上可重复使用的软件组件,可帮助开发者快速开发OpenHarmony系统或应用。根据其开发语言分为了2种,一种是使用JavaScript和TypeScript语言的三方组件,通常以源码或OpenHarmony npm包的方式引入,在应用开发中使用。另一种是C和C++语言的三方组件,通常以源码或OpenHarmony hpm包的方式引入,在应用开发中以NAPI的方式使用,或直接编译在OpenHarmony操作系统镜像中。