未验证 提交 6e62ff72 编写于 作者: O openharmony_ci 提交者: Gitee

!12067 ArkUI一致性问题修改

Merge pull request !12067 from 田雨/master
...@@ -72,7 +72,7 @@ reset(options: AnimatorOptions): void ...@@ -72,7 +72,7 @@ reset(options: AnimatorOptions): void
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If no page is found for pageId or fail to get object property list. |
**示例:** **示例:**
......
...@@ -49,8 +49,8 @@ let listener = mediaquery.matchMediaSync('(orientation: landscape)'); //监听 ...@@ -49,8 +49,8 @@ let listener = mediaquery.matchMediaSync('(orientation: landscape)'); //监听
### 属性 ### 属性
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------- | ------- | ---- | ---- | ---------- | | ------- | ------- | ---- | ---- | -------------------- |
| matches | boolean | 是 | 否 | 是否符合匹配条件。 | | matches | boolean | 是 | 否 | 是否符合匹配条件。 |
| media | string | 是 | 否 | 媒体事件的匹配条件。 | | media | string | 是 | 否 | 媒体事件的匹配条件。 |
...@@ -86,8 +86,8 @@ off(type: 'change', callback?: Callback<MediaQueryResult>): void ...@@ -86,8 +86,8 @@ off(type: 'change', callback?: Callback<MediaQueryResult>): void
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------------------- | ---- | ----------------------------- | | -------- | -------------------------------- | ---- | ---------------------------------------------------------- |
| type | boolean | 是 | 必须填写字符串'change'。 | | type | string | 是 | 必须填写字符串'change'。 |
| callback | Callback<MediaQueryResult> | 否 | 需要去注册的回调,如果参数缺省则去注册该句柄下所有的回调。 | | callback | Callback<MediaQueryResult> | 否 | 需要去注册的回调,如果参数缺省则去注册该句柄下所有的回调。 |
**示例:** **示例:**
...@@ -107,14 +107,17 @@ off(type: 'change', callback?: Callback<MediaQueryResult>): void ...@@ -107,14 +107,17 @@ off(type: 'change', callback?: Callback<MediaQueryResult>): void
listener.off('change', onPortrait) // 去注册回调 listener.off('change', onPortrait) // 去注册回调
``` ```
## MediaQueryResult ## MediaQueryResult
用于执行媒体查询操作。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
### 属性 ### 属性
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------- | ------- | ---- | ---- | ---------- | | ------- | ------- | ---- | ---- | -------------------- |
| matches | boolean | 是 | 否 | 是否符合匹配条件。 | | matches | boolean | 是 | 否 | 是否符合匹配条件。 |
| media | string | 是 | 否 | 媒体事件的匹配条件。 | | media | string | 是 | 否 | 媒体事件的匹配条件。 |
...@@ -143,7 +146,7 @@ struct MediaQueryExample { ...@@ -143,7 +146,7 @@ struct MediaQueryExample {
} }
aboutToAppear() { aboutToAppear() {
let portraitFunc = this.onPortrait.bind(this) //bind current js instance let portraitFunc = this.onPortrait.bind(this) // bind current js instance
this.listener.on('change', portraitFunc) this.listener.on('change', portraitFunc)
} }
......
...@@ -146,10 +146,10 @@ prompt.showDialog({ ...@@ -146,10 +146,10 @@ prompt.showDialog({
**系统能力:** SystemCapability.ArkUI.ArkUI.Full **系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- | | ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| title | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | 否 | 标题文本。 | | title | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | 否 | 标题文本。 |
| message | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | 否 | 内容文本。 | | message | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | 否 | 内容文本。 |
| buttons | Array | 否 | 对话框中按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 | | buttons | [[Button](#button),[Button](#button)?,[Button](#button)?] | 否 | 对话框中按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 |
## ShowDialogSuccessResponse ## ShowDialogSuccessResponse
...@@ -157,9 +157,9 @@ prompt.showDialog({ ...@@ -157,9 +157,9 @@ prompt.showDialog({
**系统能力:** SystemCapability.ArkUI.ArkUI.Full **系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ----- | ------ | ------------------- | | ----- | ------ | ---- | ------------------------------- |
| index | number | 选中按钮在buttons数组中的索引。 | | index | number | 否 | 选中按钮在buttons数组中的索引。 |
## prompt.showActionMenu ## prompt.showActionMenu
...@@ -255,9 +255,9 @@ prompt.showActionMenu({ ...@@ -255,9 +255,9 @@ prompt.showActionMenu({
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。 **系统能力:** SystemCapability.ArkUI.ArkUI.Full。
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- | | ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| title | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | 否 | 标题文本。 | | title | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | 否 | 标题文本。 |
| buttons | Array&lt;[Button](#button)&gt; | 是 | 菜单中菜单项按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 | | buttons | [[Button](#button),[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?] | 是 | 菜单中菜单项按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 |
## ActionMenuSuccessResponse ## ActionMenuSuccessResponse
......
...@@ -32,7 +32,7 @@ showToast(options: ShowToastOptions): void ...@@ -32,7 +32,7 @@ showToast(options: ShowToastOptions): void
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
**示例:** **示例:**
...@@ -88,7 +88,7 @@ showDialog(options: ShowDialogOptions): Promise&lt;ShowDialogSuccessResponse&gt; ...@@ -88,7 +88,7 @@ showDialog(options: ShowDialogOptions): Promise&lt;ShowDialogSuccessResponse&gt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
**示例:** **示例:**
...@@ -142,7 +142,7 @@ showDialog(options: ShowDialogOptions, callback: AsyncCallback&lt;ShowDialogSucc ...@@ -142,7 +142,7 @@ showDialog(options: ShowDialogOptions, callback: AsyncCallback&lt;ShowDialogSucc
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
**示例:** **示例:**
...@@ -182,10 +182,10 @@ try { ...@@ -182,10 +182,10 @@ try {
**系统能力:** SystemCapability.ArkUI.ArkUI.Full **系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- | | ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| title | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 否 | 标题文本。 | | title | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 否 | 标题文本。 |
| message | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 否 | 内容文本。 | | message | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 否 | 内容文本。 |
| buttons | Array | 否 | 对话框中按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 | | buttons | [[Button](#button),[Button](#button)?,[Button](#button)?] | 否 | 对话框中按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 |
## ShowDialogSuccessResponse ## ShowDialogSuccessResponse
...@@ -193,9 +193,9 @@ try { ...@@ -193,9 +193,9 @@ try {
**系统能力:** SystemCapability.ArkUI.ArkUI.Full **系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ----- | ------ | ------------------- | | ----- | ------ | ---- | ------------------------------- |
| index | number | 选中按钮在buttons数组中的索引。 | | index | number | 否 | 选中按钮在buttons数组中的索引。 |
## promptAction.showActionMenu ## promptAction.showActionMenu
...@@ -218,7 +218,7 @@ showActionMenu(options: ActionMenuOptions, callback: AsyncCallback&lt;ActionMenu ...@@ -218,7 +218,7 @@ showActionMenu(options: ActionMenuOptions, callback: AsyncCallback&lt;ActionMenu
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
**示例:** **示例:**
...@@ -276,7 +276,7 @@ showActionMenu(options: ActionMenuOptions): Promise&lt;ActionMenuSuccessResponse ...@@ -276,7 +276,7 @@ showActionMenu(options: ActionMenuOptions): Promise&lt;ActionMenuSuccessResponse
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
**示例:** **示例:**
...@@ -315,9 +315,9 @@ try { ...@@ -315,9 +315,9 @@ try {
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。 **系统能力:** SystemCapability.ArkUI.ArkUI.Full。
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- | | ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| title | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 否 | 标题文本。 | | title | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 否 | 标题文本。 |
| buttons | Array&lt;[Button](#button)&gt; | 是 | 菜单中菜单项按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 | | buttons | [[Button](#button),[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?] | 是 | 菜单中菜单项按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 |
## ActionMenuSuccessResponse ## ActionMenuSuccessResponse
......
...@@ -40,9 +40,9 @@ pushUrl(options: RouterOptions): Promise&lt;void&gt; ...@@ -40,9 +40,9 @@ pushUrl(options: RouterOptions): Promise&lt;void&gt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
| 100002 | Uri error. The uri of router is not exist. | | 100002 | If the uri is not exist. |
| 100003 | Page stack error. The pages are pushed too much. | | 100003 | If the pages are pushed too much. |
**示例:** **示例:**
...@@ -89,9 +89,9 @@ pushUrl(options: RouterOptions, callback: AsyncCallback&lt;void&gt;): void ...@@ -89,9 +89,9 @@ pushUrl(options: RouterOptions, callback: AsyncCallback&lt;void&gt;): void
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
| 100002 | Uri error. The uri of router is not exist. | | 100002 | If the uri is not exist. |
| 100003 | Page stack error. The pages are pushed too much. | | 100003 | If the pages are pushed too much. |
**示例:** **示例:**
...@@ -143,9 +143,9 @@ pushUrl(options: RouterOptions, mode: RouterMode): Promise&lt;void&gt; ...@@ -143,9 +143,9 @@ pushUrl(options: RouterOptions, mode: RouterMode): Promise&lt;void&gt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
| 100002 | Uri error. The uri of router is not exist. | | 100002 | If the uri is not exist. |
| 100003 | Page stack error. The pages are pushed too much. | | 100003 | If the pages are pushed too much. |
**示例:** **示例:**
...@@ -193,9 +193,9 @@ pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback&lt;voi ...@@ -193,9 +193,9 @@ pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback&lt;voi
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
| 100002 | Uri error. The uri of router is not exist. | | 100002 | If the uri is not exist. |
| 100003 | Page stack error. The pages are pushed too much. | | 100003 | If the pages are pushed too much. |
**示例:** **示例:**
...@@ -247,8 +247,8 @@ replaceUrl(options: RouterOptions): Promise&lt;void&gt; ...@@ -247,8 +247,8 @@ replaceUrl(options: RouterOptions): Promise&lt;void&gt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found, only throw in standard system. |
| 200002 | Uri error. The uri of router is not exist. | | 200002 | If the uri is not exist. |
**示例:** **示例:**
...@@ -292,8 +292,8 @@ replaceUrl(options: RouterOptions, callback: AsyncCallback&lt;void&gt;): void ...@@ -292,8 +292,8 @@ replaceUrl(options: RouterOptions, callback: AsyncCallback&lt;void&gt;): void
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found, only throw in standard system. |
| 200002 | Uri error. The uri of router is not exist. | | 200002 | If the uri is not exist. |
**示例:** **示例:**
...@@ -344,8 +344,8 @@ replaceUrl(options: RouterOptions, mode: RouterMode): Promise&lt;void&gt; ...@@ -344,8 +344,8 @@ replaceUrl(options: RouterOptions, mode: RouterMode): Promise&lt;void&gt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found, only throw in standard system. |
| 200002 | Uri error. The uri of router is not exist. | | 200002 | If the uri is not exist. |
**示例:** **示例:**
...@@ -390,8 +390,8 @@ replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback&lt; ...@@ -390,8 +390,8 @@ replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback&lt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found, only throw in standard system. |
| 200002 | Uri error. The uri of router is not exist. | | 200002 | If the uri is not exist. |
**示例:** **示例:**
...@@ -498,11 +498,11 @@ console.log('current path = ' + page.path); ...@@ -498,11 +498,11 @@ console.log('current path = ' + page.path);
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。 **系统能力:** SystemCapability.ArkUI.ArkUI.Full。
| 名称 | 类型 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ----- | ------ | ---------------------------------- | | ----- | ------ | ---- | ------------------------------------------------------------ |
| index | number | 表示当前页面在页面栈中的索引。从栈底到栈顶,index从1开始递增。 | | index | number | 是 | 表示当前页面在页面栈中的索引。从栈底到栈顶,index从1开始递增。 |
| name | string | 表示当前页面的名称,即对应文件名。 | | name | string | 否 | 表示当前页面的名称,即对应文件名。 |
| path | string | 表示当前页面的路径。 | | path | string | 是 | 表示当前页面的路径。 |
## router.enableBackPageAlert<sup>9+</sup> ## router.enableBackPageAlert<sup>9+</sup>
...@@ -524,7 +524,7 @@ enableBackPageAlert(options: EnableAlertOptions): void ...@@ -524,7 +524,7 @@ enableBackPageAlert(options: EnableAlertOptions): void
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| --------- | ------- | | --------- | ------- |
| 100001 | Internal error. | | 100001 | If UI execution context not found. |
**示例:** **示例:**
...@@ -602,8 +602,8 @@ router.getParams(); ...@@ -602,8 +602,8 @@ router.getParams();
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。 **系统能力:** SystemCapability.ArkUI.ArkUI.Full。
| 名称 | 描述 | | 名称 | 说明 |
| -------- | ---------------------------------------- | | -------- | ------------------------------------------------------------ |
| Standard | 标准模式。 <br/>目标页面会被添加到页面路由栈顶,无论栈中是否存在相同url的页面。 | | Standard | 标准模式。 <br/>目标页面会被添加到页面路由栈顶,无论栈中是否存在相同url的页面。 |
| Single | 单实例模式。<br/>如果目标页面的url在页面栈中已经存在同url页面,离栈顶最近的页面会被移动到栈顶,移动后的页面为新建页。<br/>如目标页面的url在页面栈中不存在同url页面,按标准模式跳转。 | | Single | 单实例模式。<br/>如果目标页面的url在页面栈中已经存在同url页面,离栈顶最近的页面会被移动到栈顶,移动后的页面为新建页。<br/>如目标页面的url在页面栈中不存在同url页面,按标准模式跳转。 |
...@@ -812,7 +812,7 @@ replace(options: RouterOptions, mode: RouterMode): void ...@@ -812,7 +812,7 @@ replace(options: RouterOptions, mode: RouterMode): void
从API version9开始不再维护,建议使用[replaceUrl<sup>9+</sup>](#routerreplaceurl9) 从API version9开始不再维护,建议使用[replaceUrl<sup>9+</sup>](#routerreplaceurl9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full **系统能力:** SystemCapability.ArkUI.ArkUI.Lite
**参数:** **参数:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册