提交 000c253e 编写于 作者: Z zhaoxinyu

modify docs for Arkui err code

Signed-off-by: Nzhaoxinyu <zhaoxinyu20@huawei.com>
Change-Id: I1ab642800737436972a4cc3a6d9ddb8caf48ecc1
上级 9d66e5f2
# 接口
# 接口
- [开发说明](development-intro.md)
- Ability框架
- FA模型
......@@ -91,8 +91,10 @@
- bundle/[PackInfo (PackInfo)](js-apis-bundle-PackInfo.md)
- UI界面
- [@ohos.animator (动画)](js-apis-animator.md)
- [@ohos.curves (插值计算)](js-apis-curve.md)
- [@ohos.matrix4 (矩阵变换)](js-apis-matrix4.md)
- [@ohos.mediaquery (媒体查询)](js-apis-mediaquery.md)
- [@ohos.prompt (弹窗)](js-apis-prompt.md)
- [@ohos.promptAction (弹窗)](js-apis-promptAction.md)
- [@ohos.router (页面路由)](js-apis-router.md)
- [@ohos.uiAppearance(用户界面外观)](js-apis-uiappearance.md)
- 图形图像
......@@ -266,6 +268,7 @@
- 已停止维护的接口
- [@ohos.bytrace (性能打点)](js-apis-bytrace.md)
- [@ohos.data.storage (轻量级存储)](js-apis-data-storage.md)
- [@ohos.prompt (弹窗)](js-apis-prompt.md)
- [@system.app (应用上下文)](js-apis-system-app.md)
- [@system.battery (电量信息)](js-apis-system-battery.md)
- [@system.bluetooth (蓝牙)](js-apis-system-bluetooth.md)
......
......@@ -12,17 +12,16 @@
```js
import animator from '@ohos.animator';
```
## create<sup>9+</sup>
## createAnimator
createAnimator(options: AnimatorOptions): AnimatorResult
create(options: AnimatorOptions): AnimatorResult
定义Animator类。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。 |
......@@ -34,73 +33,67 @@ createAnimator(options: AnimatorOptions): AnimatorResult
**示例:**
```html
<!-- hml -->
<div class="container">
<div class="Animation" style="height: {{divHeight}}px; width: {{divWidth}}px; background-color: red;" onclick="Show">
</div>
</div>
```
```js
// js
export default {
data : {
divWidth: 200,
divHeight: 200,
animator: null
},
onInit() {
var options = {
duration: 1500,
easing: 'friction',
delay: 0,
fill: 'forwards',
iterations: 2,
direction: "normal",
iterations: 3,
begin: 200.0,
end: 400.0
end: 400.0,
};
this.animator = animator.createAnimator(options);
},
Show() {
var options1 = {
duration: 2000,
easing: 'friction',
fill: 'forwards',
iterations: 1,
begin: 200.0,
end: 400.0
};
this.animator.update(options1);
var _this = this;
this.animator.onframe = function(value) {
_this.divWidth = value;
_this.divHeight = value;
};
this.animator.play();
}
}
animator.create(options);
```
## AnimatorResult
定义Animator结果接口。
### update
<span id = "#resetsup9sup"></span>
update(options: AnimatorOptions): void
### reset<sup>9+</sup>
reset(options: AnimatorOptions): void
更新当前动画器。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.animator(动画)](../errorcodes/errorcode-animator.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
animator.update(options);
var options = {
duration: 1500,
easing: 'friction',
delay: 0,
fill: 'forwards',
direction: "normal",
iterations: 3,
begin: 200.0,
end: 400.0,
};
try {
animator.reset(options);
} catch(error) {
console.error(`Animator reset failed, error code: ${error.code}, message: ${error.message}.`);
}
```
### play
......@@ -112,6 +105,7 @@ play(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.play();
```
......@@ -125,6 +119,7 @@ finish(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.finish();
```
......@@ -138,6 +133,7 @@ pause(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.pause();
```
......@@ -151,6 +147,7 @@ cancel(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.cancel();
```
......@@ -164,6 +161,7 @@ reverse(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.reverse();
```
......@@ -177,11 +175,13 @@ onframe: (progress: number) => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | -------- |
| progress | number | 是 | 动画的当前进度。 |
**示例:**
```js
animator.onframe();
```
......@@ -195,6 +195,7 @@ onfinish: () => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.onfinish();
```
......@@ -202,12 +203,13 @@ animator.onfinish();
### oncancel
oncancel: () => void
不再维护
动画被取消时回调。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.oncancel();
```
......@@ -221,10 +223,13 @@ onrepeat: () => void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
animator.onrepeat();
```
## AnimatorOptions
定义动画选项。
......@@ -241,3 +246,122 @@ animator.onrepeat();
| iterations | number | 是 | 动画播放次数,默认值1。设置为0时不播放,设置为-1时无限次播放。 |
| begin | number | 是 | 动画插值起点,默认为0。 |
| end | number | 是 | 动画插值终点,默认为1。 |
## 完整示例
```html
<!-- hml -->
<div class="container">
<div class="Animation" style="height: {{divHeight}}px; width: {{divWidth}}px; background-color: red;" onclick="Show">
</div>
</div>
```
```js
export default {
data: {
divWidth: 200,
divHeight: 200,
animator: null
},
onInit() {
var options = {
duration: 1500,
easing: 'friction',
delay: 0,
fill: 'forwards',
direction: "normal",
iterations: 2,
begin: 200.0,
end: 400.0
};
this.animator = animator.create(options);
},
Show() {
var options1 = {
duration: 1500,
easing: 'friction',
delay: 0,
fill: 'forwards',
direction: "normal",
iterations: 2,
begin: 0,
end: 400.0,
};
try {
this.animator.reset(options1);
} catch(error) {
console.error(`Animator reset failed, error code: ${error.code}, message: ${error.message}.`);
}
var _this = this;
this.animator.onframe = function(value) {
_this.divWidth = value;
_this.divHeight = value;
};
this.animator.play();
}
}
```
![zh-cn_image_00007](figures/zh-cn_image_00007.gif)
## update<sup>(deprecated)</sup>
update(options: AnimatorOptions): void
更新当前动画器。
从API version9开始不再维护,建议使用[reset<sup>9+</sup>](#reset9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。 |
**示例:**
```js
animator.update(options);
```
## createAnimator<sup>(deprecated)</sup>
createAnimator(options: AnimatorOptions): AnimatorResult
定义Animator类。
从API version9开始不再维护,建议使用[create<sup>9+</sup>](#create9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ------- |
| options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。 |
**返回值:**
| 类型 | 说明 |
| --------------------------------- | ------------- |
| [AnimatorResult](#animatorresult) | Animator结果接口。 |
**示例:**
```js
var options = {
duration: 1500,
easing: 'friction',
delay: 0,
fill: 'forwards',
direction: "normal",
iterations: 3,
begin: 200.0,
end: 400.0,
};
this.animator = animator.createAnimator(options);
```
\ No newline at end of file
# 插值计算
设置动画插值曲线,用于构造阶梯曲线对象、构造三阶贝塞尔曲线对象和构造弹簧曲线对象。
本模块提供设置动画插值曲线功能,用于构造阶梯曲线对象、构造三阶贝塞尔曲线对象和构造弹簧曲线对象。
> **说明:**
> 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
>
> 本模块首批接口从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
## 导入模块
......@@ -20,11 +21,13 @@ initCurve(curve?: Curve):ICurve
插值曲线的初始化函数,可以根据入参创建一个插值曲线对象。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
| ------ | ------------------------------------------------------------ | ---- | ------------ | ---------- |
| curve | [Curve](ts-appendix-enums.md#curve) | 否 | Curve.Linear | 曲线类型。 |
| curve | [Curve](../arkui-ts/ts-appendix-enums.md#curve) | 否 | Curve.Linear | 曲线类型。 |
**返回值:**
......@@ -48,6 +51,8 @@ stepsCurve(count: number, end: boolean):ICurve
构造阶梯曲线对象。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -77,6 +82,7 @@ cubicBezierCurve(x1: number, y1: number, x2: number, y2: number):ICurve
构造三阶贝塞尔曲线对象,曲线的值必须处于0-1之间。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -108,6 +114,7 @@ springCurve(velocity: number, mass: number, stiffness: number, damping: number)
构造弹簧曲线对象。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -143,6 +150,8 @@ interpolate(fraction:&nbsp;number): number
插值曲线的插值计算函数,可以通过传入的归一化时间参数返回当前的插值
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -171,11 +180,13 @@ init(curve?: Curve): string
插值曲线的初始化函数,可以根据入参创建一个插值曲线对象,从API version9开始废弃,推荐使用[Curves.initCurve](#curvesinitcurve9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
| ------ | ------------------------------------------------------------ | ---- | ------------ | ---------- |
| curve |[Curve](ts-appendix-enums.md#curve) | 否 | Curve.Linear | 曲线类型。 |
| curve |[Curve](../arkui-ts/ts-appendix-enums.md#curve) | 否 | Curve.Linear | 曲线类型。 |
## Curves.steps<sup>(deprecated)</sup>
......@@ -185,6 +196,8 @@ steps(count: number, end: boolean): string
构造阶梯曲线对象,从API version9开始废弃,推荐使用[Curves. stepsCurve](# curvesstepscurve9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -200,6 +213,7 @@ cubicBezier(x1: number, y1: number, x2: number, y2: number): string
构造三阶贝塞尔曲线对象,曲线的值必须处于0-1之间,API version9开始废弃,推荐使用 [Curves.cubicBezierCurve](#curvescubicbeziercurve9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -217,6 +231,8 @@ spring(velocity: number, mass: number, stiffness: number, damping: number): stri
构造弹簧曲线对象,从API version9开始废弃,推荐使用[Curves.springCurve](#curvesspringcurve9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
# 矩阵变换
可对图形进行平移、旋转和缩放等。
本模块提供矩阵变换功能,可对图形进行平移、旋转和缩放等。
> **说明:**
>
> 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> 本模块首批接口从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
## 导入模块
......@@ -21,6 +21,8 @@ init(array: Array&lt;number&gt;): Matrix4Transit
Matrix的构造函数,可以通过传入的参数创建一个四阶矩阵,矩阵为列优先。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -85,6 +87,8 @@ identity(): Matrix4Transit
Matrix的初始化函数,可以返回一个单位矩阵对象。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**返回值:**
| 类型 | 说明 |
......@@ -128,6 +132,8 @@ copy(): Matrix4Transit
Matrix的拷贝函数,可以拷贝一份当前的矩阵对象。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**返回值:**
| 类型 | 说明 |
......@@ -174,6 +180,8 @@ combine(matrix: Matrix4): Matrix4Transit
Matrix的叠加函数,可以将两个矩阵的效果叠加起来生成一个新的矩阵对象。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -222,9 +230,10 @@ struct Test {
invert(): Matrix4Transit
Matrix的逆函数,可以返回一个当前矩阵对象的逆矩阵,即效果正好相反。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**返回值:**
| 类型 | 说明 |
......@@ -263,9 +272,10 @@ struct Tests {
translate({x?: number, y?: number, z?: number}): Matrix4Transit
Matrix的平移函数,可以为当前矩阵增加x轴/Y轴/Z轴平移效果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -310,6 +320,8 @@ scale({x?: number, y?: number, z?: number, centerX?: number, centerY?: number}):
Matrix的缩放函数,可以为当前矩阵增加x轴/Y轴/Z轴缩放效果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -356,6 +368,8 @@ rotate({x?: number, y?: number, z?: number, angle?: number, centerX?: Length, ce
Matrix的旋转函数,可以为当前矩阵增加x轴/Y轴/Z轴旋转效果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -403,6 +417,8 @@ transformPoint(point: Point): Point
Matrix的坐标点转换函数,可以将当前的变换效果作用到一个坐标点上。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
......@@ -3,6 +3,7 @@
创建并显示文本提示框、对话框和操作菜单。
> **说明:**
> 从API Version 9 开始,该接口不再维护,推荐使用新接口[@ohos.promptAction (弹窗)](js-apis-promptAction.md)
>
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -45,7 +46,7 @@ prompt.showToast({
| 名称 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| message | string\| [Resource](../../ui/ts-types.md#resource类型)<sup>9+</sup> | 是 | 显示的文本信息。 |
| message | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 是 | 显示的文本信息。 |
| duration | number | 否 | 默认值1500ms,取值区间:1500ms-10000ms。若小于1500ms则取默认值,若大于10000ms则取上限值10000ms。 |
| bottom | string\| number | 否 | 设置弹窗边框距离屏幕底部的位置。 |
......@@ -146,8 +147,8 @@ prompt.showDialog({
| 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| title | string\| [Resource](../../ui/ts-types.md#resource类型)<sup>9+</sup> | 否 | 标题文本。 |
| message | string\| [Resource](../../ui/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> | 否 | 内容文本。 |
| buttons | Array | 否 | 对话框中按钮的数组,结构为:{text:'button',&nbsp;color:&nbsp;'\#666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 |
## ShowDialogSuccessResponse
......@@ -255,7 +256,7 @@ prompt.showActionMenu({
| 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| title | string\| [Resource](../../ui/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个按钮时弹窗不显示。 |
## ActionMenuSuccessResponse
......@@ -276,6 +277,6 @@ prompt.showActionMenu({
| 名称 | 类型 | 必填 | 说明 |
| ----- | ---------------------------------------- | ---- | ------- |
| text | string\| [Resource](../../ui/ts-types.md#resource类型)<sup>9+</sup> | 是 | 按钮文本内容。 |
| color | string\| [Resource](../../ui/ts-types.md#resource类型)<sup>9+</sup> | 是 | 按钮文本颜色。 |
| text | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 是 | 按钮文本内容。 |
| color | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 是 | 按钮文本颜色。 |
# 弹窗
创建并显示文本提示框、对话框和操作菜单。
> **说明:**
>
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
```js
import promptAction from '@ohos.promptAction'
```
## promptAction.showToast
showToast(options: ShowToastOptions): void
创建并显示文本提示框。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------------- | ---- | ------- |
| options | [ShowToastOptions](#showtoastoptions) | 是 | 文本弹窗选项。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
try {
promptAction.showToast({
message: 'Message Info',
duration: 2000,
});
} catch (error) {
console.error(`showToast args error code is ${error.code}, message is ${error.message}`);
};
```
![zh-cn_image_0001](figures/zh-cn_image_0001.gif)
## ShowToastOptions
文本提示框的选项。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。
| 名称 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| message | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 是 | 显示的文本信息。 |
| duration | number | 否 | 默认值1500ms,取值区间:1500ms-10000ms。若小于1500ms则取默认值,若大于10000ms则取上限值10000ms。 |
| bottom | string\| number | 否 | 设置弹窗边框距离屏幕底部的位置。 |
## promptAction.showDialog
showDialog(options: ShowDialogOptions): Promise&lt;ShowDialogSuccessResponse&gt;
创建并显示对话框,对话框响应后同步返回结果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | --------------------------------------- | ---- | ------ |
| options | [ShowDialogOptions](#showdialogoptions) | 是 | 对话框选项。 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | -------- |
| Promise&lt;[ShowDialogSuccessResponse](#showdialogsuccessresponse)&gt; | 对话框响应结果。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
try {
promptAction.showDialog({
title: 'Title Info',
message: 'Message Info',
buttons: [
{
text: 'button1',
color: '#000000',
},
{
text: 'button2',
color: '#000000',
}
],
})
.then(data => {
console.info('showDialog success, click button: ' + data.index);
})
.catch(err => {
console.info('showDialog error: ' + err);
})
} catch (error) {
console.error(`showDialog args error code is ${error.code}, message is ${error.message}`);
};
```
![zh-cn_image_0002](figures/zh-cn_image_0002.gif)
## promptAction.showDialog
showDialog(options: ShowDialogOptions, callback: AsyncCallback&lt;ShowDialogSuccessResponse&gt;):void
创建并显示对话框,对话框响应结果异步返回。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ------------ |
| options | [ShowDialogOptions](#showdialogoptions) | 是 | 页面显示对话框信息描述。 |
| callback | AsyncCallback&lt;[ShowDialogSuccessResponse](#showdialogsuccessresponse)&gt; | 是 | 对话框响应结果回调。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
try {
promptAction.showDialog({
title: 'showDialog Title Info',
message: 'Message Info',
buttons: [
{
text: 'button1',
color: '#000000',
},
{
text: 'button2',
color: '#000000',
}
]
}, (err, data) => {
if (err) {
console.info('showDialog err: ' + err);
return;
}
console.info('showDialog success callback, click button: ' + data.index);
});
} catch (error) {
console.error(`showDialog args error code is ${error.code}, message is ${error.message}`);
};
```
![zh-cn_image_0002](figures/zh-cn_image_0002.gif)
## ShowDialogOptions
对话框的选项。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| title | 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。 |
## ShowDialogSuccessResponse
对话框的响应结果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 说明 |
| ----- | ------ | ------------------- |
| index | number | 选中按钮在buttons数组中的索引。 |
## promptAction.showActionMenu
showActionMenu(options: ActionMenuOptions, callback: AsyncCallback&lt;ActionMenuSuccessResponse&gt;):void
创建并显示操作菜单,菜单响应结果异步返回。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| options | [ActionMenuOptions](#actionmenuoptions) | 是 | 操作菜单选项。 |
| callback | AsyncCallback&lt;[ActionMenuSuccessResponse](#actionmenusuccessresponse)> | 是 | 菜单响应结果回调。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
try {
promptAction.showActionMenu({
title: 'Title Info',
buttons: [
{
text: 'item1',
color: '#666666',
},
{
text: 'item2',
color: '#000000',
},
]
}, (err, data) => {
if (err) {
console.info('showActionMenu err: ' + err);
return;
}
console.info('showActionMenu success callback, click button: ' + data.index);
})
} catch (error) {
console.error(`showActionMenu args error code is ${error.code}, message is ${error.message}`);
};
```
![zh-cn_image_0005](figures/zh-cn_image_0005.gif)
## promptAction.showActionMenu
showActionMenu(options: ActionMenuOptions): Promise&lt;ActionMenuSuccessResponse&gt;
创建并显示操作菜单,菜单响应后同步返回结果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | --------------------------------------- | ---- | ------- |
| options | [ActionMenuOptions](#actionmenuoptions) | 是 | 操作菜单选项。 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ------- |
| Promise&lt;[ActionMenuSuccessResponse](#actionmenusuccessresponse)&gt; | 菜单响应结果。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.promptAction(弹窗)](../errorcodes/errorcode-promptAction.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
try {
promptAction.showActionMenu({
title: 'showActionMenu Title Info',
buttons: [
{
text: 'item1',
color: '#666666',
},
{
text: 'item2',
color: '#000000',
},
]
})
.then(data => {
console.info('showActionMenu success, click button: ' + data.index);
})
.catch(err => {
console.info('showActionMenu error: ' + err);
})
} catch (error) {
console.error(`showActionMenu args error code is ${error.code}, message is ${error.message}`);
};
```
![zh-cn_image_0005](figures/zh-cn_image_0005.gif)
## ActionMenuOptions
操作菜单的选项。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full。
| 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| 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个按钮时弹窗不显示。 |
## ActionMenuSuccessResponse
操作菜单的响应结果。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 必填 | 说明 |
| ----- | ------ | ---- | ------------------------ |
| index | number | 否 | 选中按钮在buttons数组中的索引,从0开始。 |
## Button
菜单中的菜单项按钮。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 必填 | 说明 |
| ----- | ---------------------------------------- | ---- | ------- |
| text | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 是 | 按钮文本内容。 |
| color | string\| [Resource](../arkui-ts/ts-types.md#resource类型)<sup>9+</sup> | 是 | 按钮文本颜色。 |
......@@ -14,23 +14,41 @@
import router from '@ohos.router'
```
## router.push
## router.pushUrl<sup>9+</sup>
push(options: RouterOptions): void
pushUrl(options: RouterOptions): Promise&lt;void&gt;
跳转到应用内的指定页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | --------- |
| options | [RouterOptions](#routeroptions) | 是 | 跳转页面描述信息。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | --------- |
| Promise&lt;void&gt; | 异常返回结果 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 100002 | Uri error. The uri of router is not exist. |
| 100003 | Page stack error. The pages are pushed too much. |
**示例:**
```js
router.push({
try {
router.pushUrl({
url: 'pages/routerpage2',
params: {
data1: 'message',
......@@ -38,84 +56,361 @@ router.push({
data3: [123, 456, 789]
},
},
});
})
.then(() => {
// success
})
.catch(err => {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
})
} catch (error) {
console.error(`pushUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.push<sup>9+</sup>
push(options: RouterOptions, mode: RouterMode): void
## router.pushUrl<sup>9+</sup>
pushUrl(options: RouterOptions, callback: AsyncCallback&lt;void&gt;): void
跳转到应用内的指定页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | --------- |
| options | [RouterOptions](#routeroptions) | 是 | 跳转页面描述信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 异常响应回调 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 100002 | Uri error. The uri of router is not exist. |
| 100003 | Page stack error. The pages are pushed too much. |
**示例:**
```js
try {
router.pushUrl({
url: 'pages/routerpage2',
params: {
data1: 'message',
data2: {
data3: [123, 456, 789]
},
},
}, (err) => {
if (err) {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
return;
}
console.info('pushUrl success');
});
} catch (error) {
console.error(`pushUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.pushUrl<sup>9+</sup>
pushUrl(options: RouterOptions, mode: RouterMode): Promise&lt;void&gt;
跳转到应用内的指定页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------- |
| options | [RouterOptions](#routeroptions) | 是 | 跳转页面描述信息。 |
| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | --------- |
| Promise&lt;void&gt; | 异常返回结果 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 100002 | Uri error. The uri of router is not exist. |
| 100003 | Page stack error. The pages are pushed too much. |
**示例:**
```js
router.push({
url: 'pages/routerpage2/routerpage2',
try {
router.pushUrl({
url: 'pages/routerpage2',
params: {
data1: 'message',
data2: {
data3: [123, 456, 789]
},
},
},router.RouterMode.Standard);
}, router.RouterMode.Standard)
.then(() => {
// success
})
.catch(err => {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
})
} catch (error) {
console.error(`pushUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.replace
## router.pushUrl<sup>9+</sup>
replace(options: RouterOptions): void
pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback&lt;void&gt;): void
用应用内的某个页面替换当前页面,并销毁被替换的页面。
跳转到应用内的指定页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------- |
| options | [RouterOptions](#routeroptions) | 是 | 跳转页面描述信息。 |
| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 异常响应回调 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 100002 | Uri error. The uri of router is not exist. |
| 100003 | Page stack error. The pages are pushed too much. |
**示例:**
```js
try {
router.pushUrl({
url: 'pages/routerpage2',
params: {
data1: 'message',
data2: {
data3: [123, 456, 789]
},
},
}, router.RouterMode.Standard, (err) => {
if (err) {
console.error(`pushUrl failed, code is ${err.code}, message is ${err.message}`);
return;
}
console.info('pushUrl success');
});
} catch (error) {
console.error(`pushUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.replaceUrl<sup>9+</sup>
replaceUrl(options: RouterOptions): Promise&lt;void&gt;
用应用内的某个页面替换当前页面,并销毁被替换的页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ------------------ |
| options | [RouterOptions](#routeroptions) | 是 | 替换页面描述信息。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | --------- |
| Promise&lt;void&gt; | 异常返回结果 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 200002 | Uri error. The uri of router is not exist. |
**示例:**
```js
router.replace({
try {
router.replaceUrl({
url: 'pages/detail',
params: {
data1: 'message',
},
});
})
.then(() => {
// success
})
.catch(err => {
console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`);
})
} catch (error) {
console.error(`replaceUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.replace<sup>9+</sup>
## router.replaceUrl<sup>9+</sup>
replace(options: RouterOptions, mode: RouterMode): void
replaceUrl(options: RouterOptions, callback: AsyncCallback&lt;void&gt;): void
用应用内的某个页面替换当前页面,并销毁被替换的页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ------------------ |
| options | [RouterOptions](#routeroptions) | 是 | 替换页面描述信息。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 异常响应回调 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 200002 | Uri error. The uri of router is not exist. |
**示例:**
```js
try {
router.replaceUrl({
url: 'pages/detail',
params: {
data1: 'message',
},
}, (err) => {
if (err) {
console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`);
return;
}
console.info('replaceUrl success');
});
} catch (error) {
console.error(`replaceUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.replaceUrl<sup>9+</sup>
replaceUrl(options: RouterOptions, mode: RouterMode): Promise&lt;void&gt;
用应用内的某个页面替换当前页面,并销毁被替换的页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------- |
| options | [RouterOptions](#routeroptions) | 是 | 替换页面描述信息。 |
| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | --------- |
| Promise&lt;void&gt; | 异常返回结果 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 200002 | Uri error. The uri of router is not exist. |
**示例:**
```js
router.replace({
url: 'pages/detail/detail',
try {
router.replaceUrl({
url: 'pages/detail',
params: {
data1: 'message',
},
}, router.RouterMode.Standard);
}, router.RouterMode.Standard)
.then(() => {
// success
})
.catch(err => {
console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`);
})
} catch (error) {
console.error(`replaceUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.replaceUrl<sup>9+</sup>
replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback&lt;void&gt;): void
用应用内的某个页面替换当前页面,并销毁被替换的页面。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------- |
| options | [RouterOptions](#routeroptions) | 是 | 替换页面描述信息。 |
| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
| 200002 | Uri error. The uri of router is not exist. |
**示例:**
```js
try {
router.replaceUrl({
url: 'pages/detail',
params: {
data1: 'message',
},
}, router.RouterMode.Standard, (err) => {
if (err) {
console.error(`replaceUrl failed, code is ${err.code}, message is ${err.message}`);
return;
}
console.info('replaceUrl success');
});
} catch (error) {
console.error(`replaceUrl args error code is ${error.code}, message is ${error.message}`);
};
```
## router.back
......@@ -127,6 +422,7 @@ back(options?: RouterOptions ): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ------------------------------------------------------------ |
| options | [RouterOptions](#routeroptions) | 否 | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页,页面栈里面的page不会回收,出栈后会被回收。 |
......@@ -160,11 +456,13 @@ getLength(): string
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**返回值:**
| 类型 | 说明 |
| ------ | ------------------ |
| string | 页面数量,页面栈支持最大数值是32。 |
**示例:**
```js
var size = router.getLength();
console.log('pages stack size = ' + size);
......@@ -205,25 +503,38 @@ console.log('current path = ' + page.path);
| name | string | 表示当前页面的名称,即对应文件名。 |
| path | string | 表示当前页面的路径。 |
## router.enableAlertBeforeBackPage
## router.enableBackPageAlert<sup>9+</sup>
enableAlertBeforeBackPage(options: EnableAlertOptions): void
enableBackPageAlert(options: EnableAlertOptions): void
开启页面返回询问对话框。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | --------- |
| options | [EnableAlertOptions](#enablealertoptions) | 是 | 文本弹窗信息描述。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。
| 错误码ID | 错误码信息 |
| --------- | ------- |
| 100001 | Internal error. |
**示例:**
```js
router.enableAlertBeforeBackPage({
try {
router.enableBackPageAlert({
message: 'Message Info'
});
} catch(error) {
console.error(`enableBackPageAlert failed, code is ${error.code}, message is ${error.message}`);
}
```
## EnableAlertOptions
......@@ -244,6 +555,7 @@ disableAlertBeforeBackPage(): void
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**示例:**
```js
router.disableAlertBeforeBackPage();
```
......@@ -401,3 +713,144 @@ struct Second {
}
}
```
## router.push<sup>(deprecated)</sup>
push(options: RouterOptions): void
跳转到应用内的指定页面。
从API version9开始不再维护,建议使用[pushUrl<sup>9+</sup>](#routerpushurl9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | --------- |
| options | [RouterOptions](#routeroptions) | 是 | 跳转页面描述信息。 |
**示例:**
```js
router.push({
url: 'pages/routerpage2',
params: {
data1: 'message',
data2: {
data3: [123, 456, 789]
},
},
});
```
## router.push<sup>(deprecated)</sup>
push(options: RouterOptions, mode: RouterMode): void
跳转到应用内的指定页面。
从API version9开始不再维护,建议使用[pushUrl<sup>9+</sup>](#routerpushurl9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------- |
| options | [RouterOptions](#routeroptions) | 是 | 跳转页面描述信息。 |
| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 |
**示例:**
```js
router.push({
url: 'pages/routerpage2/routerpage2',
params: {
data1: 'message',
data2: {
data3: [123, 456, 789]
},
},
},router.RouterMode.Standard);
```
## router.replace<sup>(deprecated)</sup>
replace(options: RouterOptions): void
用应用内的某个页面替换当前页面,并销毁被替换的页面。
从API version9开始不再维护,建议使用[replaceUrl<sup>9+</sup>](#routerreplaceurl9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ------------------ |
| options | [RouterOptions](#routeroptions) | 是 | 替换页面描述信息。 |
**示例:**
```js
router.replace({
url: 'pages/detail',
params: {
data1: 'message',
},
});
```
## router.replace<sup>(deprecated)</sup>
replace(options: RouterOptions, mode: RouterMode): void
用应用内的某个页面替换当前页面,并销毁被替换的页面。
从API version9开始不再维护,建议使用[replaceUrl<sup>9+</sup>](#routerreplaceurl9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------- | ---- | ---------- |
| options | [RouterOptions](#routeroptions) | 是 | 替换页面描述信息。 |
| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 |
**示例:**
```js
router.replace({
url: 'pages/detail/detail',
params: {
data1: 'message',
},
}, router.RouterMode.Standard);
```
## router.enableAlertBeforeBackPage<sup>(deprecated)</sup>
enableAlertBeforeBackPage(options: EnableAlertOptions): void
开启页面返回询问对话框。
从API version9开始不再维护,建议使用[enableBackPageAlert<sup>9+</sup>](#routerenablebackpagealert9)
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | --------- |
| options | [EnableAlertOptions](#enablealertoptions) | 是 | 文本弹窗信息描述。 |
**示例:**
```js
router.enableAlertBeforeBackPage({
message: 'Message Info'
});
```
\ No newline at end of file
......@@ -148,8 +148,6 @@
- [组件内转场](ts-transition-animation-component.md)
- [共享元素转场](ts-transition-animation-shared-elements.md)
- [路径动画](ts-motion-path-animation.md)
- [矩阵变换](ts-matrix-transformation.md)
- [插值计算](ts-interpolation-calculation.md)
- 全局UI方法
- 弹窗
- [警告弹窗](ts-methods-alert-dialog-box.md)
......
# 动画错误码
## 100001 内部错误
### 错误信息
Internal error.
### 错误描述
当出现了开发者解决不了的内部异常错误,会报此错误码,并描述具体是哪种内部错误。
### 可能原因
未成功获取渲染引擎,解析参数失败等。
### 处理步骤
NA
\ No newline at end of file
# 弹窗错误码
## 100001 内部错误
### 错误信息
Internal error.
### 错误描述
当出现了开发者解决不了的内部异常错误,会报此错误码,并描述具体是哪种内部错误。
### 可能原因
未成功获取渲染引擎,解析参数失败等。
### 处理步骤
NA
\ No newline at end of file
# 页面路由错误码
## 100001 内部错误
### 错误信息
Internal error.
### 错误描述
当出现了开发者解决不了的内部异常错误,系统会产生此错误码,并描述具体是哪种内部错误。
### 可能原因
未成功获取渲染引擎,解析参数失败等。
### 处理步骤
NA
## 100002 路由输入的uri错误
### 错误信息
Uri error. The uri of router is not exist.
### 错误描述
当跳转页面输入的uri错误或者不存在,系统会产生此错误码。
### 可能原因
输入的路由uri错误或者不存在。
### 处理步骤
请检查输入的路由uri是否正确。
## 100003 路由压入的page过多
### 错误信息
Page stack error. The pages are pushed too much.
### 错误描述
当跳转页面压入页面数超过32,系统会产生此错误码。
### 可能原因
压入pages过多。
### 处理步骤
请清除多余或无效的页面。
## 200002 路由输入的uri错误
### 错误信息
Uri error. The uri of router is not exist.
### 错误描述
当替换页面输入的uri错误或不存在,系统会产生此错误码。
### 可能原因
输入的路由uri错误或不存在。
### 处理步骤
请检查输入的路由uri是否正确。
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册