未验证 提交 0ab8d45a 编写于 作者: O openharmony_ci 提交者: Gitee

!22182 翻译完成:21515+21518 元能力资料废弃模块引入问题修改+RN readme

Merge pull request !22182 from wusongqing/TR21515
...@@ -495,7 +495,7 @@ Sets the display orientation for this ability. This API uses an asynchronous cal ...@@ -495,7 +495,7 @@ Sets the display orientation for this ability. This API uses an asynchronous cal
```ts ```ts
import featureAbility from '@ohos.ability.featureAbility'; import featureAbility from '@ohos.ability.featureAbility';
import bundle from '@ohos.bundle'; import bundle from '@ohos.bundle.bundleManager';
let context: featureAbility.Context = featureAbility.getContext(); let context: featureAbility.Context = featureAbility.getContext();
let orientation = bundle.DisplayOrientation.UNSPECIFIED; let orientation = bundle.DisplayOrientation.UNSPECIFIED;
context.setDisplayOrientation(orientation, (error) => { context.setDisplayOrientation(orientation, (error) => {
...@@ -522,7 +522,7 @@ Sets the display orientation for this ability. This API uses a promise to return ...@@ -522,7 +522,7 @@ Sets the display orientation for this ability. This API uses a promise to return
```ts ```ts
import featureAbility from '@ohos.ability.featureAbility'; import featureAbility from '@ohos.ability.featureAbility';
import bundle from '@ohos.bundle'; import bundle from '@ohos.bundle.bundleManager';
let context: featureAbility.Context = featureAbility.getContext(); let context: featureAbility.Context = featureAbility.getContext();
let orientation = bundle.DisplayOrientation.UNSPECIFIED; let orientation = bundle.DisplayOrientation.UNSPECIFIED;
context.setDisplayOrientation(orientation).then((data) => { context.setDisplayOrientation(orientation).then((data) => {
...@@ -709,7 +709,7 @@ context.getProcessInfo().then((data) => { ...@@ -709,7 +709,7 @@ context.getProcessInfo().then((data) => {
getElementName(callback: AsyncCallback\<ElementName>): void getElementName(callback: AsyncCallback\<ElementName>): void
Obtains the **ohos.bundle.ElementName** object of this ability. This API uses an asynchronous callback to return the result. Obtains the **ohos.bundleManager.ElementName** object of this ability. This API uses an asynchronous callback to return the result.
This API is available only to Page abilities. This API is available only to Page abilities.
...@@ -719,7 +719,7 @@ This API is available only to Page abilities. ...@@ -719,7 +719,7 @@ This API is available only to Page abilities.
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | -------------------------------------- | | -------- | --------------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback\<[ElementName](js-apis-bundleManager-elementName.md)> | Yes | Callback used to return the **ohos.bundle.ElementName** object.| | callback | AsyncCallback\<[ElementName](js-apis-bundleManager-elementName.md)> | Yes | Callback used to return the **ohos.bundleManager.ElementName** object.|
**Example** **Example**
...@@ -741,7 +741,7 @@ context.getElementName((error, data) => { ...@@ -741,7 +741,7 @@ context.getElementName((error, data) => {
getElementName(): Promise\<ElementName> getElementName(): Promise\<ElementName>
Obtains the **ohos.bundle.ElementName** object of this ability. This API uses a promise to return the result. Obtains the **ohos.bundleManager.ElementName** object of this ability. This API uses a promise to return the result.
This API is available only to Page abilities. This API is available only to Page abilities.
...@@ -751,7 +751,7 @@ This API is available only to Page abilities. ...@@ -751,7 +751,7 @@ This API is available only to Page abilities.
| Type | Description | | Type | Description |
| --------------------- | ------------------------------------ | | --------------------- | ------------------------------------ |
| Promise\<[ElementName](js-apis-bundleManager-elementName.md)> | Promise used to return the **ohos.bundle.ElementName** object.| | Promise\<[ElementName](js-apis-bundleManager-elementName.md)> | Promise used to return the **ohos.bundleManager.ElementName** object.|
**Example** **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册