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

!7345 断链修改

Merge pull request !7345 from LiAn/OpenHarmony-3.2-Beta2
......@@ -2,7 +2,7 @@
InputConsumer模块提供对按键事件的监听。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> - 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
......@@ -32,7 +32,7 @@ on(type: "key", keyOptions: KeyOptions, callback: Callback<KeyOptions>): v
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听输入事件类型,只支持“key”。 |
| keyOptions | [keyOptions](#keyOptions) | 是 | 组合键选项,用来指定组合键输入时应该符合的条件。 |
| keyOptions | [keyOptions](#keyoptions) | 是 | 组合键选项,用来指定组合键输入时应该符合的条件。 |
| callback | Callback<KeyOptions> | 是 | 回调函数。当满足条件的按键输入产生时,回调到此函数,以传入的KeyOptions为入参。 |
**示例:**
......@@ -62,7 +62,7 @@ off(type: "key", keyOptions: KeyOptions, callback?: Callback<KeyOptions>):
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听输入事件类型,只支持“key”。 |
| keyOptions | [keyOptions](#keyOptions) | 是 | 开始监听时传入的keyOptions。 |
| keyOptions | [keyOptions](#keyoptions) | 是 | 开始监听时传入的keyOptions。 |
| callback | Callback<KeyOptions> | 是 | 开始监听时与KeyOption一同传入的回调函数 。 |
**示例:**
......@@ -77,13 +77,13 @@ inputConsumer.off('key', keyOptions, callback);
```
## KeyOption
## KeyOptions
组合键输入事件发生时,组合键满足的选项。
此接口为系统接口。
**系统能力:**SystemCapability.MultimodalInput.Input.InputConsumer
**系统能力:** SystemCapability.MultimodalInput.Input.InputConsumer
| 参数 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
......
......@@ -4,7 +4,8 @@
输入设备管理模块,用于监听输入设备连接、断开和变化,并查看输入设备相关信息。比如监听鼠标插拔,并获取鼠标的id、name和指针移动速度等信息。
> **说明**:<br>
> **说明**:
>
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -28,7 +29,7 @@ on(type: “change”, listener: Callback&lt;DeviceListener&gt;): void
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ----------- |
| type | string | 是 | 输入设备的事件类型。 |
| listener | Callback&lt;[DeviceListener](#devicelistener<sup>9+</sup>)&gt; | 是 | 可上报的输入设备事件。 |
| listener | Callback&lt;[DeviceListener](#devicelistener9)&gt; | 是 | 可上报的输入设备事件。 |
**示例**
......@@ -63,7 +64,7 @@ off(type: “change”, listener?: Callback&lt;DeviceListener&gt;): void
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ----------- |
| type | string | 是 | 输入设备的事件类型。 |
| listener | Callback&lt;[DeviceListener](#devicelistener<sup>9+</sup>)&gt; | 否 | 可上报的输入设备事件。 |
| listener | Callback&lt;[DeviceListener](#devicelistener9)&gt; | 否 | 可上报的输入设备事件。 |
**示例**
......@@ -245,7 +246,7 @@ getKeyboardType(deviceId: number, callback: AsyncCallback&lt;KeyboardType&gt;):
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------------------------------- |
| deviceId | number | 是 | 输入设备的唯一标识,同一个物理设备反复插拔,其设备id会发生变化。 |
| callback | AsyncCallback&lt;[KeyboardType](#keyboardtype)&gt; | 是 | 回调函数,异步返回查询结果。 |
| callback | AsyncCallback&lt;[KeyboardType](#keyboardtype9)&gt; | 是 | 回调函数,异步返回查询结果。 |
**示例**
......@@ -268,7 +269,7 @@ getKeyboardType(deviceId: number): Promise&lt;KeyboardType&gt;
| 参数 | 说明 |
| ---------------------------------------- | ------------------- |
| Promise&lt;[KeyboardType](#keyboardtype)&gt; | Promise实例,用于异步获取结果。 |
| Promise&lt;[KeyboardType](#keyboardtype9)&gt; | Promise实例,用于异步获取结果。 |
**示例**
......@@ -336,7 +337,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
| 名称 | 参数类型 | 说明 |
| ----------------------- | ------------------------- | -------- |
| source | [SourceType](#sourcetype) | 轴的输入源类型。 |
| axis | [AxisType](#axistype) | 轴的类型。 |
| axis | [AxisType](#axistype9) | 轴的类型。 |
| max | number | 轴的最大值。 |
| min | number | 轴的最小值。 |
| fuzz<sup>9+</sup> | number | 轴的模糊值。 |
......@@ -358,7 +359,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
| touchpad | string | 表示输入设备是触摸板。 |
| joystick | string | 表示输入设备是操纵杆。 |
## ChangeType
## ChangedType
定义监听设备热插拔事件。
......
......@@ -2,7 +2,8 @@
本模块提供对输入法框架的管理,包括隐藏输入法、查询已安装的输入法列表和显示输入法选择对话框。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -111,7 +112,7 @@ switchInputMethod(target: InputmethodProperty): Promise&lt;boolean&gt;
**返回值:**
| 类型 | 说明 |
| ----------------------------------------- | ---------------------------- |
| [Promise](#Promise) | 回调返回切换后的输入法。 |
| Promise\<boolean> | 回调返回切换后的输入法。 |
**示例:**
......@@ -123,7 +124,7 @@ switchInputMethod(target: InputmethodProperty): Promise&lt;boolean&gt;
```
## InputMethodController
下列API示例中都需使用[getInputMethodController](#getInputMethodController)回调获取到InputMethodController实例,再通过此实例调用对应方法。
下列API示例中都需使用[getInputMethodController](#getinputmethodcontroller)回调获取到InputMethodController实例,再通过此实例调用对应方法。
### stopInput
......@@ -171,7 +172,7 @@ stopInput(): Promise&lt;boolean&gt;
## InputMethodSetting<sup>8+</sup>
下列API示例中都需使用[getInputMethodSetting](#getInputMethodSetting)回调获取到InputMethodSetting实例,再通过此实例调用对应方法。
下列API示例中都需使用[getInputMethodSetting](#getinputmethodsetting)回调获取到InputMethodSetting实例,再通过此实例调用对应方法。
### listInputMethod
......
# 传感器
## 模块说明
sensor模块提供订阅传感器数据基本能力,包括订阅、取消订阅传感器数据,获取传感器列表,以及通用的传感器算法接口如通过气压值计算海拔高度、通过旋转矩阵计算设备方向等。
传感器是指用于侦测环境中所发生事件或变化,并将此消息发送至其他电子设备(如中央处理器)的设备,通常由敏感组件和转换组件组成。传感器是实现物联网智能化的重要基石,为实现全场景智慧化战略,支撑“1+8+N”产品需求,需要构筑统一的传感器管理框架,达到为各产品/业务提供低时延、低功耗的感知数据的目的。根据用途可分为以下六大类:
......@@ -54,12 +52,14 @@ on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback&lt;Acceler
);
```
### LINEAR_ACCELERATION
### LINEAR_ACCELERATION<sup>deprecated</sup>
on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:Callback&lt;LinearAccelerometerResponse&gt;, options?: Options): void
监听线性加速度传感器的数据变化。如果多次调用该接口,仅最后一次调用生效。
从API Version9开始该接口不再维护,推荐使用sensor.on.LINEAR_ACCELEROMETER<sup>9+</sup>
**需要权限**:ohos.permission.ACCELEROMETER ,该权限为系统权限
**系统能力**:SystemCapability.Sensors.Sensor
......@@ -82,6 +82,35 @@ on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:Callback&lt;Line
);
```
### LINEAR_ACCELEROMETER<sup>9+</sup>
on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER,callback:Callback&lt;LinearAccelerometerResponse&gt;, options?: Options): void
监听线性加速度传感器的数据变化。如果多次调用该接口,仅最后一次调用生效。
**需要权限**:ohos.permission.ACCELEROMETER,该权限为系统权限
**系统能力**:SystemCapability.Sensors.Sensor
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | [SensorType](#sensortype) | 是 | 要订阅的线性加速度传感器类型为SENSOR_TYPE_ID_LINEAR_ACCELEROMETER。 |
| callback | Callback&lt;[LinearAccelerometerResponse](#linearaccelerometerresponse)&gt; | 是 | 注册线性加速度传感器的回调函数,上报的数据类型为LinearAccelerometerResponse。 |
| options | [Options](#options) | 否 | 可选参数列表,设置上报频率,默认值为200000000ns。 |
**示例:**
```js
sensor.on(sensor.SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER,function(data){
console.info('X-coordinate component: ' + data.x);
console.info('Y-coordinate component: ' + data.y);
console.info('Z-coordinate component: ' + data.z);
},
{interval: 10000000}
);
```
### ACCELEROMETER_UNCALIBRATED
on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback: Callback&lt;AccelerometerUncalibratedResponse&gt;, options?: Options): void
......@@ -499,12 +528,14 @@ on(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: Callback&lt;Orientatio
);
```
### HEART_RATE
### HEART_RATE<sup>deprecated</sup>
on(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback&lt;HeartRateResponse&gt;, options?: Options): void
监听心率传感器数据变化一次。
从API Version9开始该接口不再维护,推荐使用sensor.on.HEART_BEAT_RATE<sup>9+</sup>
**需要权限**:ohos.permission.READ_HEALTH_DATA
**系统能力**:SystemCapability.Sensors.Sensor
......@@ -526,6 +557,33 @@ sensor.on(sensor.SensorType.SENSOR_TYPE_ID_HEART_RATE,function(data){
);
```
### HEART_BEAT_RATE<sup>9+</sup>
on(type: SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback: Callback&lt;HeartRateResponse&gt;, options?: Options): void
监听心率传感器数据变化一次。
**需要权限**:ohos.permission.READ_HEALTH_DATA
**系统能力**:SystemCapability.Sensors.Sensor
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | [SensorType](#sensortype) | 是 | 要订阅的心率传感器类型为SENSOR_TYPE_ID_HEART_BEAT_RATE。 |
| callback | Callback&lt;[HeartRateResponse](#heartrateresponse)&gt; | 是 | 注册一次心率传感器的回调函数,上报的数据类型为HeartRateResponse。 |
**示例:**
```js
sensor.on(sensor.SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE,function(data){
console.info("Heart rate: " + data.heartRate);
},
{interval: 10000000}
);
```
### ROTATION_VECTOR
on(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback: Callback&lt;RotationVectorResponse&gt;,options?: Options): void
......@@ -605,12 +663,14 @@ once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback&lt;Accele
);
```
### LINEAR_ACCELERATION
### LINEAR_ACCELERATION<sup>deprecated</sup>
once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:Callback&lt;LinearAccelerometerResponse&gt;): void
监听线性加速度传感器数据变化一次。
从API Version9开始该接口不再维护,推荐使用sensor.once.LINEAR_ACCELEROMETER<sup>9+</sup>
**需要权限**:ohos.permission.ACCELEROMETER ,该权限为系统权限
**系统能力**:SystemCapability.Sensors.Sensor
......@@ -631,6 +691,32 @@ once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:Callback&lt;Li
);
```
### LINEAR_ACCELEROMETER<sup>9+</sup>
once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER,callback:Callback&lt;LinearAccelerometerResponse&gt;): void
订阅一次线性加速度传感器数据。
**需要权限**:ohos.permission.ACCELEROMETER ,该权限为系统权限
**系统能力**:SystemCapability.Sensors.Sensor
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | [SensorType](#sensortype) | 是 | 线性加速度传感器类型为SENSOR_TYPE_ID_LINEAR_ACCELEROMETER。 |
| callback | Callback&lt;[LinearAccelerometerResponse](#linearaccelerometerresponse)&gt; | 是 | 注册一次线性加速度传感器的回调函数,上报的数据类型为LinearAccelerometerResponse。 |
**示例:**
```js
sensor.once(sensor.SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER, function(data) {
console.info('X-coordinate component: ' + data.x);
console.info('Y-coordinate component: ' + data.y);
console.info('Z-coordinate component: ' + data.z);
}
);
```
### ACCELEROMETER_UNCALIBRATED
once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback: Callback&lt;AccelerometerUncalibratedResponse&gt;): void
......@@ -1041,12 +1127,14 @@ once(type: SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR, callback: Callback&lt;Rota
);
```
### HEART_RATE
### HEART_RATE<sup>deprecated</sup>
once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback&lt;HeartRateResponse&gt;): void
监听心率传感器数据变化一次。
从API Version9开始该接口不再维护,推荐使用sensor.once.HEART_BEAT_RATE<sup>9+</sup>
**需要权限**:ohos.permission.READ_HEALTH_DATA
**系统能力**:SystemCapability.Sensors.Sensor
......@@ -1065,6 +1153,30 @@ once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback&lt;HeartRate
);
```
### HEART_BEAT_RATE<sup>9+</sup>
once(type: SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback: Callback&lt;HeartRateResponse&gt;): void
订阅一次心率传感器数据。
**需要权限**:ohos.permission.READ_HEALTH_DATA
**系统能力**:SystemCapability.Sensors.Sensor
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | [SensorType](#sensortype) | 是 | 心率传感器类型为SENSOR_TYPE_ID_HEART_BEAT_RATE。 |
| callback | Callback&lt;[HeartRateResponse](#heartrateresponse)&gt; | 是 | 注册一次心率传感器的回调函数,上报的数据类型为HeartRateResponse。 |
**示例:**
```js
sensor.once(sensor.SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, function(data) {
console.info("Heart rate: " + data.heartRate);
}
);
```
### WEAR_DETECTION
once(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: Callback&lt;WearDetectionResponse&gt;): void
......@@ -1326,12 +1438,14 @@ function callback(data) {
sensor.off(sensor.SensorType.SENSOR_TYPE_ID_HALL, callback);
```
### HEART_RATE
### HEART_RATE<sup>deprecated</sup>
off(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback?: Callback&lt;HeartRateResponse&gt;): void
取消订阅传感器数据。
从API Version9开始该接口不再维护,推荐使用sensor.off.HEART_BEAT_RATE<sup>9+</sup>
**需要权限**:ohos.permission.READ_HEALTH_DATA
**系统能力**:SystemCapability.Sensors.Sensor
......@@ -1352,6 +1466,32 @@ function callback(data) {
sensor.off(sensor.SensorType.SENSOR_TYPE_ID_HEART_RATE, callback);
```
### HEART_BEAT_RATE<sup>9+</sup>
off(type: SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback?: Callback&lt;HeartRateResponse&gt;): void
取消订阅传感器数据。
**需要权限**:ohos.permission.READ_HEALTH_DATA
**系统能力**:SystemCapability.Sensors.Sensor
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | [SensorType](#sensortype)[SensorType](#sensortype) | 是 | 要取消订阅的心率传感器类型为SENSOR_TYPE_ID_HEART_BEAT_RATE。 |
| callback | Callback&lt;[HeartRateResponse](#heartrateresponse)&gt; | 是 | 取消注册一次心率传感器的回调函数,上报的数据类型为HeartRateResponse。 |
**示例:**
```js
function callback(data) {
console.info("Heart rate: " + data.heartRate);
}
sensor.off(sensor.SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback);
```
### HUMIDITY
off(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback?: Callback&lt;HumidityResponse&gt;): void
......@@ -1376,12 +1516,14 @@ function callback(data) {
sensor.off(sensor.SensorType.SENSOR_TYPE_ID_HUMIDITY, callback);
```
### LINEAR_ACCELERATION
### LINEAR_ACCELERATION<sup>deprecated</sup>
off(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback?: Callback&lt;LinearAccelerometerResponse&gt;): void
取消订阅传感器数据。
从API Version9开始该接口不再维护,推荐使用sensor.off.LINEAR_ACCELEROMETER<sup>9+</sup>
**需要权限**:ohos.permission.ACCELEROMETER,该权限为系统权限
**系统能力**:SystemCapability.Sensors.Sensor
......@@ -1404,6 +1546,34 @@ function callback(data) {
sensor.off(sensor.SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback);
```
### LINEAR_ACCELEROMETER<sup>9+</sup>
off(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER, callback?: Callback&lt;LinearAccelerometerResponse&gt;): void
取消订阅传感器数据。
**需要权限**:ohos.permission.ACCELEROMETER,该权限为系统权限
**系统能力**:SystemCapability.Sensors.Sensor
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | [SensorType](#sensortype) | 是 | 要取消订阅的线性加速度传感器类型为SENSOR_TYPE_ID_LINEAR_ACCELEROMETER。 |
| callback | Callback&lt;[LinearAccelerometerResponse](#linearaccelerometerresponse)&gt; | 是 | 取消注册性加速度传感器的回调函数,上报的数据类型为LinearAccelerometerResponse。 |
**示例:**
```js
function callback(data) {
console.info('X-coordinate component: ' + data.x);
console.info('Y-coordinate component: ' + data.y);
console.info('Z-coordinate component: ' + data.z);
}
sensor.off(sensor.SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER, callback);
```
### MAGNETIC_FIELD
off(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback?: Callback&lt;MagneticFieldResponse&gt;): void
......@@ -2234,7 +2404,8 @@ createRotationMatrix(gravity: Array&lt;number&gt;, geomagnetic: Array&lt;number&
| SENSOR_TYPE_ID_HUMIDITY | 13 | 湿度传感器。 |
| SENSOR_TYPE_ID_ORIENTATION | 256 | 方向传感器。 |
| SENSOR_TYPE_ID_GRAVITY | 257 | 重力传感器。 |
| SENSOR_TYPE_ID_LINEAR_ACCELERATION | 258 | 线性加速度传感器。 |
| SENSOR_TYPE_ID_LINEAR_ACCELERATION<sup>deprecated</sup> | 258 | 线性加速度传感器。 |
| SENSOR_TYPE_ID_LINEAR_ACCELEROMETER | 258 | 线性加速度传感器。 |
| SENSOR_TYPE_ID_ROTATION_VECTOR | 259 | 旋转矢量传感器。 |
| SENSOR_TYPE_ID_AMBIENT_TEMPERATURE | 260 | 环境温度传感器。 |
| SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED | 261 | 未校准磁场传感器。 |
......@@ -2242,7 +2413,8 @@ createRotationMatrix(gravity: Array&lt;number&gt;, geomagnetic: Array&lt;number&
| SENSOR_TYPE_ID_SIGNIFICANT_MOTION | 264 | 有效运动传感器。 |
| SENSOR_TYPE_ID_PEDOMETER_DETECTION | 265 | 计步检测传感器。 |
| SENSOR_TYPE_ID_PEDOMETER | 266 | 计步传感器。 |
| SENSOR_TYPE_ID_HEART_RATE | 278 | 心率传感器。 |
| SENSOR_TYPE_ID_HEART_RATE<sup>deprecated</sup> | 278 | 心率传感器。 |
| SENSOR_TYPE_ID_HEART_BEAT_RATE | 278 | 心率传感器。 |
| SENSOR_TYPE_ID_WEAR_DETECTION | 280 | 佩戴检测传感器。 |
| SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED | 281 | 未校准加速度计传感器。 |
......
......@@ -23,7 +23,7 @@ import {UiDriver, BY, MatchPattern, ResizeDirection, WindowMode} from '@ohos.uit
## By
UiTest框架通过By类提供了丰富的控件特征描述API,用于进行控件筛选来匹配/查找出目标控件。<br>
By提供的API能力具有以下几个特点:<br>1、支持单属性匹配和多属性组合匹配,例如同时指定目标控件text和id。<br>2、控件属性支持多种匹配模式。<br>3、支持控件绝对定位,相对定位,可通过[By.isBefore](#byisbefore)[By.isAfter](#byisafter)等API限定邻近控件特征进行辅助定位。<br>By类提供的所有API均为同步接口,建议使用者通过静态构造器BY来链式创建By对象。
By提供的API能力具有以下几个特点:<br>1、支持单属性匹配和多属性组合匹配,例如同时指定目标控件text和id。<br>2、控件属性支持多种匹配模式。<br>3、支持控件绝对定位,相对定位,可通过[By.isBefore](#isbefore)[By.isAfter](#isafter)等API限定邻近控件特征进行辅助定位。<br>By类提供的所有API均为同步接口,建议使用者通过静态构造器BY来链式创建By对象。
```js
BY.text('123').type('button')
......@@ -1566,7 +1566,7 @@ getWindowMode(): Promise\<WindowMode>
| 类型 | 说明 |
| ------------------------------------------------ | ------------------------------------- |
| Promise\<[WindowMode](#WindowMode<sup>9+</sup>)> | 以Promise形式返回窗口的窗口模式信息。 |
| Promise\<[WindowMode](#windowmode9)> | 以Promise形式返回窗口的窗口模式信息。 |
**示例:**
......@@ -1695,7 +1695,7 @@ resize(wide: number, height: number, direction: ResizeDirection): Promise\<bool>
| --------- | ------------------------------------------------ | ---- | ------------------------------------------------------------ |
| wide | number | 是 | 以number的形式传入调整后窗口的宽度。 |
| height | number | 是 | 以number的形式传入调整后窗口的高度。 |
| direction | [ResizeDirection](#resizedirection<sup>9+</sup>) | 是 | 以[ResizeDirection](#ResizeDirection<sup>9+</sup>)的形式传入窗口调整的方向。 |
| direction | [ResizeDirection](#resizedirection9) | 是 | 以[ResizeDirection](#resizedirection9)的形式传入窗口调整的方向。 |
**返回值:**
......
......@@ -29,9 +29,9 @@ getOnlineUpdater(upgradeInfo: UpgradeInfo): Updater
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | --------------------------- | ---- | ---- |
| upgradeInfo | [UpgradeInfo](#upgradeinfo) | 是 | 升级信息对象 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | --------------------------- | ---- | ------ |
| upgradeInfo | [UpgradeInfo](#upgradeinfo) | 是 | 升级信息对象 |
**返回值:**
......@@ -67,8 +67,8 @@ getRestorer(): Restorer
**返回值:**
| 类型 | 说明 |
| ------------------- | ---- |
| 类型 | 说明 |
| --------------------- | ------ |
| [Restorer](#restorer) | 恢复出厂对象 |
**示例:**
......@@ -91,8 +91,8 @@ getLocalUpdater(): LocalUpdater
**返回值:**
| 类型 | 说明 |
| ------------------- | ---- |
| 类型 | 说明 |
| ----------------------------- | ------ |
| [LocalUpdater](#localupdater) | 本地升级对象 |
**示例:**
......@@ -119,8 +119,8 @@ checkNewVersion(callback: AsyncCallback\<CheckResult>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | -------------- |
| callback | AsyncCallback\<[CheckResult](#checkresult)> | 是 | 回调函数,返回搜包结果对象。 |
**示例:**
......@@ -143,8 +143,8 @@ checkNewVersion(): Promise\<CheckResult>
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| ------------------------------------- | ------------------- |
| Promise\<[CheckResult](#checkresult)> | Promise对象,返回搜包结果对象。 |
**示例:**
......@@ -171,8 +171,8 @@ getNewVersionInfo(callback: AsyncCallback\<NewVersionInfo>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------------- |
| callback | AsyncCallback\<[NewVersionInfo](#newversioninfo)> | 是 | 回调函数,返回新版本信息对象。 |
**示例:**
......@@ -196,8 +196,8 @@ getNewVersionInfo(): Promise\<NewVersionInfo>
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| ---------------------------------------- | -------------------- |
| Promise\<[NewVersionInfo](#newversioninfo)> | Promise对象,返回新版本信息对象。 |
**示例:**
......@@ -223,11 +223,11 @@ getNewVersionDescription(versionDigestInfo: VersionDigestInfo, descriptionOption
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| descriptionOptions | [DescriptionOptions](#descriptionoptions) | 是 | 描述文件选项 |
| callback | AsyncCallback\<Array\<[ComponentDescription](#componentdescription)>>) | 是 | 回调函数,返回新版本描述文件 |
| 参数名 | 类型 | 必填 | 说明 |
| ------------------ | ---------------------------------------- | ---- | -------------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| descriptionOptions | [DescriptionOptions](#descriptionoptions) | 是 | 描述文件选项 |
| callback | AsyncCallback\<Array\<[ComponentDescription](#componentdescription)>>) | 是 | 回调函数,返回新版本描述文件 |
**示例:**
......@@ -261,15 +261,15 @@ getNewVersionDescription(versionDigestInfo: VersionDigestInfo, descriptionOption
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| 参数名 | 类型 | 必填 | 说明 |
| ------------------ | ---------------------------------------- | ---- | ------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| descriptionOptions | [DescriptionOptions](#descriptionoptions) | 是 | 描述文件选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| ---------------------------------------- | ------------------- |
| Promise\<Array\<[ComponentDescription](#componentdescription)>> | Promise对象,返回新版本描述文件 |
**示例:**
......@@ -305,8 +305,8 @@ getCurrentVersionInfo(callback: AsyncCallback\<CurrentVersionInfo>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------- |
| callback | AsyncCallback\<[CurrentVersionInfo](#currentversioninfo)> | 是 | 回调函数,返回当前版本信息对象。 |
**示例:**
......@@ -331,8 +331,8 @@ getCurrentVersionInfo(): Promise\<CurrentVersionInfo>
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| ---------------------------------------- | ------------------- |
| Promise\<[CurrentVersionInfo](#currentversioninfo)> | Promise对象,返回当前版本对象。 |
**示例:**
......@@ -359,10 +359,10 @@ getCurrentVersionDescription(descriptionOptions: DescriptionOptions, callback: A
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| descriptionOptions | [DescriptionOptions](#descriptionoptions) | 是 | 描述文件选项 |
| callback | AsyncCallback\<Array\<[ComponentDescription](#componentdescription)>>) | 是 | 回调函数,返回当前版本描述文件 |
| 参数名 | 类型 | 必填 | 说明 |
| ------------------ | ---------------------------------------- | ---- | --------------- |
| descriptionOptions | [DescriptionOptions](#descriptionoptions) | 是 | 描述文件选项 |
| callback | AsyncCallback\<Array\<[ComponentDescription](#componentdescription)>>) | 是 | 回调函数,返回当前版本描述文件 |
**示例:**
......@@ -391,14 +391,14 @@ getCurrentVersionDescription(descriptionOptions: DescriptionOptions): Promise\<A
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| ------------------ | ---------------------------------------- | ---- | ------ |
| descriptionOptions | [DescriptionOptions](#descriptionoptions) | 是 | 描述文件选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| ---------------------------------------- | -------------------- |
| Promise\<Array\<[ComponentDescription](#componentdescription)>> | Promise对象,返回当前版本描述文件 |
**示例:**
......@@ -429,8 +429,8 @@ getTaskInfo(callback: AsyncCallback\<TaskInfo>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------- | ---- | ---------------- |
| callback | AsyncCallback\<[TaskInfo](#taskinfo)> | 是 | 回调函数,返回升级任务信息对象。 |
**示例:**
......@@ -453,8 +453,8 @@ getTaskInfo(): Promise\<TaskInfo>
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| ------------------------------- | ------------------- |
| Promise\<[TaskInfo](#taskinfo)> | Promise对象,返回任务信息对象。 |
**示例:**
......@@ -479,11 +479,11 @@ download(versionDigestInfo: VersionDigestInfo, downloadOptions: DownloadOptions,
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| downloadOptions | [DownloadOptions](#downloadoptions) | 是 | 下载选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当下载成功时,err为undefined,否则为错误对象。 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | --------------------------------------- | ---- | ---------------------------------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| downloadOptions | [DownloadOptions](#downloadoptions) | 是 | 下载选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当下载成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -515,15 +515,15 @@ download(versionDigestInfo: VersionDigestInfo, downloadOptions: DownloadOptions)
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | --------------------------------------- | ---- | ------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| downloadOptions | [DownloadOptions](#downloadoptions) | 是 | 下载选项 |
| downloadOptions | [DownloadOptions](#downloadoptions) | 是 | 下载选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -558,11 +558,11 @@ resumeDownload(versionDigestInfo: VersionDigestInfo, resumeDownloadOptions: Resu
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| resumeDownloadOptions | [ResumeDownloadOptions](#resumedownloadoptions) | 是 | 恢复下载选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当恢复下载成功时,err为undefined,否则为错误对象。 |
| 参数名 | 类型 | 必填 | 说明 |
| --------------------- | ---------------------------------------- | ---- | ------------------------------------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| resumeDownloadOptions | [ResumeDownloadOptions](#resumedownloadoptions) | 是 | 恢复下载选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当恢复下载成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -593,15 +593,15 @@ resumeDownload(versionDigestInfo: VersionDigestInfo, resumeDownloadOptions: Resu
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| 参数名 | 类型 | 必填 | 说明 |
| --------------------- | ---------------------------------------- | ---- | ------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| resumeDownloadOptions | [ResumeDownloadOptions](#resumedownloadoptions) | 是 | 恢复下载选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -635,11 +635,11 @@ pauseDownload(versionDigestInfo: VersionDigestInfo, pauseDownloadOptions: PauseD
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| pauseDownloadOptions | [PauseDownloadOptions](#pausedownloadoptions) | 是 | 暂停下载选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当暂停下载成功时,err为undefined,否则为错误对象。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------------------- | ---------------------------------------- | ---- | ------------------------------------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| pauseDownloadOptions | [PauseDownloadOptions](#pausedownloadoptions) | 是 | 暂停下载选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当暂停下载成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -670,15 +670,15 @@ pauseDownload(versionDigestInfo: VersionDigestInfo, pauseDownloadOptions: PauseD
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| 参数名 | 类型 | 必填 | 说明 |
| -------------------- | ---------------------------------------- | ---- | ------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| pauseDownloadOptions | [PauseDownloadOptions](#pausedownloadoptions) | 是 | 暂停下载选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -712,11 +712,11 @@ upgrade(versionDigestInfo: VersionDigestInfo, upgradeOptions: UpgradeOptions, ca
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| upgradeOptions | [UpgradeOptions](#upgradeoptions) | 是 | 更新选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当升级执行成功时,err为undefined,否则为错误对象。 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | --------------------------------------- | ---- | ------------------------------------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| upgradeOptions | [UpgradeOptions](#upgradeoptions) | 是 | 更新选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当升级执行成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -747,15 +747,15 @@ upgrade(versionDigestInfo: VersionDigestInfo, upgradeOptions: UpgradeOptions): P
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | --------------------------------------- | ---- | ------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| upgradeOptions | [UpgradeOptions](#upgradeoptions) | 是 | 更新选项 |
| upgradeOptions | [UpgradeOptions](#upgradeoptions) | 是 | 更新选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -789,11 +789,11 @@ clearError(versionDigestInfo: VersionDigestInfo, clearOptions: ClearOptions, cal
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| clearOptions | [ClearOptions](#clearoptions) | 是 | 清除选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当清除异常成功时,err为undefined,否则为错误对象。 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | --------------------------------------- | ---- | ------------------------------------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| clearOptions | [ClearOptions](#clearoptions) | 是 | 清除选项 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当清除异常成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -824,15 +824,15 @@ clearError(versionDigestInfo: VersionDigestInfo, clearOptions: ClearOptions): Pr
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | --------------------------------------- | ---- | ------ |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要信息 |
| clearOptions | [ClearOptions](#clearoptions) | 是 | 更新选项 |
| clearOptions | [ClearOptions](#clearoptions) | 是 | 更新选项 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -866,8 +866,8 @@ getUpgradePolicy(callback: AsyncCallback\<UpgradePolicy>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------------- |
| callback | AsyncCallback\<[UpgradePolicy](#upgradepolicy)> | 是 | 回调函数,返回升级策略信息对象 |
**示例:**
......@@ -891,8 +891,8 @@ getUpgradePolicy(): Promise\<UpgradePolicy>
**返回值:**
| 类型 | 说明 |
| --------------------------------------- | ----------------- |
| 类型 | 说明 |
| ---------------------------------------- | --------------------- |
| Promise\<[UpgradePolicy](#upgradepolicy)> | Promise对象,返回升级策略信息对象。 |
**示例:**
......@@ -918,10 +918,10 @@ setUpgradePolicy(policy: UpgradePolicy, callback: AsyncCallback\<void>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------- |
| policy | [UpgradePolicy](#upgradepolicy) | 是 | 升级策略 |
| callback | AsyncCallback\<void> | 是 | 回调函数,返回设置结果对象 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------------- | ---- | ------------- |
| policy | [UpgradePolicy](#upgradepolicy) | 是 | 升级策略 |
| callback | AsyncCallback\<void> | 是 | 回调函数,返回设置结果对象 |
**示例:**
......@@ -948,14 +948,14 @@ setUpgradePolicy(policy: UpgradePolicy): Promise\<void>
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ----------------------------- | ---- | ------ |
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------------------------------- | ---- | ---- |
| policy | [UpgradePolicy](#upgradepolicy) | 是 | 升级策略 |
**返回值:**
| 类型 | 说明 |
| ---------------- | --------------- |
| 类型 | 说明 |
| -------------- | ------------------- |
| Promise\<void> | Promise对象,返回设置结果对象。 |
**示例:**
......@@ -985,8 +985,8 @@ terminateUpgrade(callback: AsyncCallback\<void>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback\<void> | 是 | 回调函数。当清除升级缓存成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -1009,8 +1009,8 @@ terminateUpgrade(): Promise\<void>
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -1033,10 +1033,10 @@ on(eventClassifyInfo: EventClassifyInfo, taskCallback: UpgradeTaskCallback): voi
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 是 | 事件回调 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ---- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 是 | 事件回调 |
**示例:**
......@@ -1060,10 +1060,10 @@ off(eventClassifyInfo: EventClassifyInfo, taskCallback?: UpgradeTaskCallback): v
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 否 | 事件回调 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ---- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 否 | 事件回调 |
**示例:**
......@@ -1092,8 +1092,8 @@ factoryReset(callback: AsyncCallback\<void>): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback\<void> | 是 | 回调函数。当恢复出厂执行成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -1116,8 +1116,8 @@ factoryReset(): Promise\<void>
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -1144,11 +1144,11 @@ verifyUpgradePackage(upgradeFile: UpgradeFile, certsFile: string, callback: Asyn
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| upgradeFile | [UpgradeFile](#upgradefile) | 是 | 升级文件 |
| certsFile | string | 是 | 证书文件路径 |
| callback | AsyncCallback\<void> | 是 | 回调函数,返回升级包校验结果对象 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | --------------------------- | ---- | ---------------- |
| upgradeFile | [UpgradeFile](#upgradefile) | 是 | 升级文件 |
| certsFile | string | 是 | 证书文件路径 |
| callback | AsyncCallback\<void> | 是 | 回调函数,返回升级包校验结果对象 |
**示例:**
......@@ -1175,15 +1175,15 @@ verifyUpgradePackage(upgradeFile: UpgradeFile, certsFile: string): Promise\<void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| upgradeFile | [UpgradeFile](#upgradefile) | 是 | 升级文件 |
| certsFile | string | 是 | 证书文件路径 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | --------------------------- | ---- | ------ |
| upgradeFile | [UpgradeFile](#upgradefile) | 是 | 升级文件 |
| certsFile | string | 是 | 证书文件路径 |
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | ---------------------- |
| Promise\<void> | Promise对象,返回升级包校验结果对象。 |
**示例:**
......@@ -1211,10 +1211,10 @@ applyNewVersion(upgradeFiles: Array<[UpgradeFile](#upgradefile)>, callback: Asyn
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| upgradeFile | Array<[UpgradeFile](#upgradefile)> | 是 | 升级文件 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当安装升级包执行成功时,err为undefined,否则为错误对象。 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | ---------------------------------- | ---- | --------------------------------------- |
| upgradeFile | Array<[UpgradeFile](#upgradefile)> | 是 | 升级文件 |
| callback | AsyncCallback\<void> | 是 | 回调函数。当安装升级包执行成功时,err为undefined,否则为错误对象。 |
**示例:**
......@@ -1241,8 +1241,8 @@ applyNewVersion(upgradeFiles: Array<[UpgradeFile](#upgradefile)>): Promise\<void
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | ---------------- |
| 类型 | 说明 |
| -------------- | -------------------------- |
| Promise\<void> | Promise对象。无返回结果的Promise对象。 |
**示例:**
......@@ -1268,10 +1268,10 @@ on(eventClassifyInfo: EventClassifyInfo, taskCallback: UpgradeTaskCallback): voi
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 是 | 事件回调 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ---- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 是 | 事件回调 |
**示例:**
......@@ -1297,10 +1297,10 @@ off(eventClassifyInfo: EventClassifyInfo, taskCallback?: UpgradeTaskCallback): v
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 是 | 事件回调 |
| 参数名 | 类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ---- |
| eventClassifyInfo | [EventClassifyInfo](#eventclassifyinfo) | 是 | 事件信息 |
| taskCallback | [UpgradeTaskCallback](#upgradetaskcallback) | 是 | 事件回调 |
**示例:**
......@@ -1323,10 +1323,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| upgradeApp | string | 是 | 调用方包名 |
| businessType | [BusinessType](#businesstype) | 是 | 升级业务类型 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------ | ----------------------------- | ---- | ------ |
| upgradeApp | string | 是 | 调用方包名 |
| businessType | [BusinessType](#businesstype) | 是 | 升级业务类型 |
## BusinessType
......@@ -1334,10 +1334,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| vendor | [BusinessVendor](#businessvendor) | 是 | 供应商 |
| subType | [BusinessSubType](#businesssubtype) | 是 | 类型 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------- | ----------------------------------- | ---- | ---- |
| vendor | [BusinessVendor](#businessvendor) | 是 | 供应商 |
| subType | [BusinessSubType](#businesssubtype) | 是 | 类型 |
## CheckResult
......@@ -1345,10 +1345,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| isExistNewVersion | bool | 是 | 是否有新版本 |
| newVersionInfo | [NewVersionInfo](#newversioninfo) | 否 | 新版本数据 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----------------- | --------------------------------- | ---- | ------ |
| isExistNewVersion | bool | 是 | 是否有新版本 |
| newVersionInfo | [NewVersionInfo](#newversioninfo) | 否 | 新版本数据 |
## NewVersionInfo
......@@ -1356,10 +1356,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要 |
| versionComponents | Array\<[VersionComponent](#versioncomponent)> | 是 | 版本组件 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ---- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要 |
| versionComponents | Array\<[VersionComponent](#versioncomponent)> | 是 | 版本组件 |
## VersionDigestInfo
......@@ -1367,9 +1367,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| versionDigest | string | 是 | 版本摘要 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------- | ------ | ---- | ---- |
| versionDigest | string | 是 | 版本摘要 |
## VersionComponent
......@@ -1377,16 +1377,16 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| componentId | number | 是 | 组件标识 |
| componentType | [ComponentType](#componentyype) | 是 | 组件类型 |
| upgradeAction | [UpgradeAction](#upgradeaction) | 是 | 升级方式 |
| displayVersion | string | 是 | 显示版本号 |
| innerVersion | string | 是 | 版本号 |
| size | number | 是 | 升级包大小 |
| effectiveMode | [EffectiveMode](#effectivemode) | 是 | 生效模式 |
| descriptionInfo | [DescriptionInfo](#descriptioninfo) | 是 | 版本描述文件信息 |
| 名称 | 参数类型 | 必填 | 说明 |
| --------------- | ----------------------------------- | ---- | -------- |
| componentId | number | 是 | 组件标识 |
| componentType | [ComponentType](#componenttype) | 是 | 组件类型 |
| upgradeAction | [UpgradeAction](#upgradeaction) | 是 | 升级方式 |
| displayVersion | string | 是 | 显示版本号 |
| innerVersion | string | 是 | 版本号 |
| size | number | 是 | 升级包大小 |
| effectiveMode | [EffectiveMode](#effectivemode) | 是 | 生效模式 |
| descriptionInfo | [DescriptionInfo](#descriptioninfo) | 是 | 版本描述文件信息 |
## DescriptionOptions
......@@ -1394,10 +1394,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| format | [DescriptionFormat](#descriptionformat) | 是 | 描述文件格式 |
| language | string | 是 | 描述文件语言 |
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | --------------------------------------- | ---- | ------ |
| format | [DescriptionFormat](#descriptionformat) | 是 | 描述文件格式 |
| language | string | 是 | 描述文件语言 |
## ComponentDescription
......@@ -1405,10 +1405,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| componentId | string | 是 | 组件标识 |
| descriptionInfo | [DescriptionInfo](#descriptioninfo) | 是 | 描述文件信息 |
| 名称 | 参数类型 | 必填 | 说明 |
| --------------- | ----------------------------------- | ---- | ------ |
| componentId | string | 是 | 组件标识 |
| descriptionInfo | [DescriptionInfo](#descriptioninfo) | 是 | 描述文件信息 |
## DescriptionInfo
......@@ -1416,10 +1416,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| descriptionType | [DescriptionType](#descriptiontype) | 是 | 描述文件类型 |
| content | string | 是 | 描述文件内容 |
| 名称 | 参数类型 | 必填 | 说明 |
| --------------- | ----------------------------------- | ---- | ------ |
| descriptionType | [DescriptionType](#descriptiontype) | 是 | 描述文件类型 |
| content | string | 是 | 描述文件内容 |
## CurrentVersionInfo
......@@ -1427,11 +1427,11 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| osVersion | string | 是 | 系统版本号 |
| deviceName | string | 是 | 设备名 |
| versionComponents | Array\<[VersionComponent](#vesioncomponent)> | 否 | 版本组件 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ----- |
| osVersion | string | 是 | 系统版本号 |
| deviceName | string | 是 | 设备名 |
| versionComponents | Array\<[VersionComponent](#versioncomponent)> | 否 | 版本组件 |
## DownloadOptions
......@@ -1439,10 +1439,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| allowNetwork | [NetType](#nettype) | 是 | 网络类型 |
| order | [Order](#order) | 是 | 升级指令 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------ | ------------------- | ---- | ---- |
| allowNetwork | [NetType](#nettype) | 是 | 网络类型 |
| order | [Order](#order) | 是 | 升级指令 |
## ResumeDownloadOptions
......@@ -1450,9 +1450,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| allowNetwork | [NetType](#nettype) | 是 | 网络类型 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------ | ------------------- | ---- | ---- |
| allowNetwork | [NetType](#nettype) | 是 | 网络类型 |
## PauseDownloadOptions
......@@ -1460,9 +1460,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| isAllowAutoResume | bool | 是 | 是否允许自动恢复 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----------------- | ---- | ---- | -------- |
| isAllowAutoResume | bool | 是 | 是否允许自动恢复 |
## UpgradeOptions
......@@ -1470,9 +1470,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| order | [Order](#order) | 是 | 升级指令 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----- | --------------- | ---- | ---- |
| order | [Order](#order) | 是 | 升级指令 |
## ClearOptions
......@@ -1480,9 +1480,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| status | [UpgradeStatus](#upgradestatus) | 是 | 异常状态 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------ | ------------------------------- | ---- | ---- |
| status | [UpgradeStatus](#upgradestatus) | 是 | 异常状态 |
## UpgradePolicy
......@@ -1490,11 +1490,11 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| downloadStrategy | bool | 是 | 自动下载策略 |
| autoUpgradeStrategy | bool | 是 | 自动升级策略 |
| autoUpgradePeriods | Array\<[UpgradePeriod](#upgradeperiod)> | 是 | 自动升级时间段 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------------------- | ---- | ------- |
| downloadStrategy | bool | 是 | 自动下载策略 |
| autoUpgradeStrategy | bool | 是 | 自动升级策略 |
| autoUpgradePeriods | Array\<[UpgradePeriod](#upgradeperiod)> | 是 | 自动升级时间段 |
## UpgradePeriod
......@@ -1502,10 +1502,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| start | number | 是 | 开始时间 |
| end | number | 是 | 结束时间 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ---- | ---- |
| start | number | 是 | 开始时间 |
| end | number | 是 | 结束时间 |
## TaskInfo
......@@ -1513,10 +1513,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| existTask | bool | 是 | 是否存在任务 |
| taskBody | [TaskBody](#taskinfo) | 是 | 任务数据 |
| 名称 | 参数类型 | 必填 | 说明 |
| --------- | --------------------- | ---- | ------ |
| existTask | bool | 是 | 是否存在任务 |
| taskBody | [TaskBody](#taskinfo) | 是 | 任务数据 |
## EventInfo
......@@ -1524,10 +1524,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| eventId | [EventId](#eventid) | 是 | 事件ID |
| taskBody | [TaskBody](#taskinfo) | 是 | 任务数据 |
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | --------------------- | ---- | ---- |
| eventId | [EventId](#eventid) | 是 | 事件ID |
| taskBody | [TaskBody](#taskinfo) | 是 | 任务数据 |
## TaskBody
......@@ -1535,15 +1535,15 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要 |
| status | [UpgradeStatus](#upgradestatus) | 是 | 升级状态 |
| subStatus | number | 否 | 子状态 |
| progress | number | 是 | 进度 |
| installMode | number | 是 | 安装模式 |
| errorMessages | Array\<[ErrorMessage](#errormessage)> | 否 | 错误信息 |
| versionComponents | Array\<[VersionComponent](#versioncomponent)> | 是 | 版本组件 |
| 名称 | 参数类型 | 必填 | 说明 |
| ----------------- | ---------------------------------------- | ---- | ---- |
| versionDigestInfo | [VersionDigestInfo](#versiondigestinfo) | 是 | 版本摘要 |
| status | [UpgradeStatus](#upgradestatus) | 是 | 升级状态 |
| subStatus | number | 否 | 子状态 |
| progress | number | 是 | 进度 |
| installMode | number | 是 | 安装模式 |
| errorMessages | Array\<[ErrorMessage](#errormessage)> | 否 | 错误信息 |
| versionComponents | Array\<[VersionComponent](#versioncomponent)> | 是 | 版本组件 |
## ErrorMessage
......@@ -1551,10 +1551,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| errorCode | number | 是 | 错误码 |
| errorMessage | string | 是 | 错误描述 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------ | ------ | ---- | ---- |
| errorCode | number | 是 | 错误码 |
| errorMessage | string | 是 | 错误描述 |
## EventClassifyInfo
......@@ -1562,10 +1562,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| eventClassify | [EventClassify](#eventclassify) | 是 | 事件类型 |
| extraInfo | string | 是 | 额外信息 |
| 名称 | 参数类型 | 必填 | 说明 |
| ------------- | ------------------------------- | ---- | ---- |
| eventClassify | [EventClassify](#eventclassify) | 是 | 事件类型 |
| extraInfo | string | 是 | 额外信息 |
## UpgradeFile
......@@ -1573,10 +1573,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| ------------------- | --------------------------- | ---- | ------- |
| fileType | [ComponentType](#componenttype) | 是 | 文件类型 |
| filePath | string | 是 | 文件路径 |
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | ------------------------------- | ---- | ---- |
| fileType | [ComponentType](#componenttype) | 是 | 文件类型 |
| filePath | string | 是 | 文件路径 |
## UpgradeTaskCallback
......@@ -1586,9 +1586,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 名称 | 参数类型 | 必填 | 说明 |
| --------------- | ---------------------------------------- | ---- | ---- |
| eventInfo | [EventInfo](#eventinfo) | 是 | 事件信息 |
| 名称 | 参数类型 | 必填 | 说明 |
| --------- | ----------------------- | ---- | ---- |
| eventInfo | [EventInfo](#eventinfo) | 是 | 事件信息 |
## BusinessVendor
......@@ -1596,9 +1596,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| PUBLIC | "public" | 开源 |
| 参数名 | 默认值 | 说明 |
| ------ | -------- | ---- |
| PUBLIC | "public" | 开源 |
## BusinessSubType
......@@ -1606,9 +1606,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| FIRMWARE | 1 | 固件 |
| 参数名 | 默认值 | 说明 |
| -------- | ---- | ---- |
| FIRMWARE | 1 | 固件 |
## ComponentType
......@@ -1616,9 +1616,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| OTA | 1 | 固件 |
| 参数名 | 默认值 | 说明 |
| ---- | ---- | ---- |
| OTA | 1 | 固件 |
## UpgradeAction
......@@ -1626,10 +1626,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| UPGRADE | "upgrade" | 差分包 |
| RECOVERY | "recovery" | 修复包 |
| 参数名 | 默认值 | 说明 |
| -------- | ---------- | ---- |
| UPGRADE | "upgrade" | 差分包 |
| RECOVERY | "recovery" | 修复包 |
## EffectiveMode
......@@ -1637,11 +1637,11 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| COLD | 1 | 冷升级 |
| LIVE | 2 | 热升级 |
| LIVE_AND_COLD | 3 | 融合升级 |
| 参数名 | 默认值 | 说明 |
| ------------- | ---- | ---- |
| COLD | 1 | 冷升级 |
| LIVE | 2 | 热升级 |
| LIVE_AND_COLD | 3 | 融合升级 |
## DescriptionType
......@@ -1649,10 +1649,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| CONTENT | 0 | 内容 |
| URI | 1 | 链接 |
| 参数名 | 默认值 | 说明 |
| ------- | ---- | ---- |
| CONTENT | 0 | 内容 |
| URI | 1 | 链接 |
## DescriptionFormat
......@@ -1660,10 +1660,10 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| STANDARD | 0 | 标准格式 |
| SIMPLIFIED | 1 | 简易格式 |
| 参数名 | 默认值 | 说明 |
| ---------- | ---- | ---- |
| STANDARD | 0 | 标准格式 |
| SIMPLIFIED | 1 | 简易格式 |
## NetType
......@@ -1671,13 +1671,13 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| CELLULAR | 1 | 数据网络 |
| METERED_WIFI | 2 | 热点WIFI |
| NOT_METERED_WIFI | 4 | 非热点WIFI |
| WIFI | 6 | WIFI |
| CELLULAR_AND_WIFI | 7 | 数据网络和WIFI |
| 参数名 | 默认值 | 说明 |
| ----------------- | ---- | --------- |
| CELLULAR | 1 | 数据网络 |
| METERED_WIFI | 2 | 热点WIFI |
| NOT_METERED_WIFI | 4 | 非热点WIFI |
| WIFI | 6 | WIFI |
| CELLULAR_AND_WIFI | 7 | 数据网络和WIFI |
## Order
......@@ -1685,13 +1685,13 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| DOWNLOAD | 1 | 下载 |
| INSTALL | 2 | 安装 |
| DOWNLOAD_AND_INSTALL | 3 | 下载并安装 |
| APPLY | 4 | 生效 |
| INSTALL_AND_APPLY | 6 | 安装并生效 |
| 参数名 | 默认值 | 说明 |
| -------------------- | ---- | ----- |
| DOWNLOAD | 1 | 下载 |
| INSTALL | 2 | 安装 |
| DOWNLOAD_AND_INSTALL | 3 | 下载并安装 |
| APPLY | 4 | 生效 |
| INSTALL_AND_APPLY | 6 | 安装并生效 |
## UpgradeStatus
......@@ -1699,18 +1699,18 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| WAITING_DOWNLOAD | 20 | 待下载 |
| DOWNLOADING | 21 | 下载中 |
| DOWNLOAD_PAUSED | 22 | 下载暂停 |
| DOWNLOAD_FAIL | 23 | 下载失败 |
| WAITING_INSTALL | 30 | 待安装 |
| UPDATING | 31 | 更新中 |
| WAITING_APPLY | 40 | 待生效 |
| APPLYING | 21 | 生效中 |
| UPGRADE_SUCCESS | 50 | 升级成功 |
| UPGRADE_FAIL | 51 | 升级失败 |
| 参数名 | 默认值 | 说明 |
| ---------------- | ---- | ---- |
| WAITING_DOWNLOAD | 20 | 待下载 |
| DOWNLOADING | 21 | 下载中 |
| DOWNLOAD_PAUSED | 22 | 下载暂停 |
| DOWNLOAD_FAIL | 23 | 下载失败 |
| WAITING_INSTALL | 30 | 待安装 |
| UPDATING | 31 | 更新中 |
| WAITING_APPLY | 40 | 待生效 |
| APPLYING | 21 | 生效中 |
| UPGRADE_SUCCESS | 50 | 升级成功 |
| UPGRADE_FAIL | 51 | 升级失败 |
## EventClassify
......@@ -1718,9 +1718,9 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| TASK | 0x01000000 | 任务事件 |
| 参数名 | 默认值 | 说明 |
| ---- | ---------- | ---- |
| TASK | 0x01000000 | 任务事件 |
## EventId
......@@ -1728,22 +1728,22 @@ localUpdater.off(eventClassifyInfo, onTaskUpdate);
**系统能力**:SystemCapability.Update.UpdateService
| 参数名 | 默认值 | 说明 |
| ------------------- | ---- | -------- |
| EVENT_TASK_BASE | 0x01000000 | 任务事件 |
| EVENT_TASK_RECEIVE | 0x01000001 | 收到任务 |
| EVENT_TASK_CANCEL | 0x01000010 | 取消任务 |
| EVENT_DOWNLOAD_WAIT | 0x01000011 | 待下载 |
| EVENT_DOWNLOAD_START | 0x01000100 | 开始下载 |
| EVENT_DOWNLOAD_UPDATE | 0x01000101 | 下载进度更新 |
| EVENT_DOWNLOAD_PAUSE | 0x01000110 | 下载暂停 |
| EVENT_DOWNLOAD_RESUME | 0x01000111 | 恢复下载 |
| EVENT_DOWNLOAD_SUCCESS | 0x01001000 | 下载成功 |
| EVENT_DOWNLOAD_FAIL | 0x01001001 | 下载失败 |
| EVENT_UPGRADE_WAIT | 0x01001010 | 待升级 |
| EVENT_UPGRADE_START | 0x01001011 | 开始升级 |
| EVENT_UPGRADE_UPDATE | 0x01001100 | 升级中 |
| EVENT_APPLY_WAIT | 0x01001101 | 待生效 |
| EVENT_APPLY_START | 0x01001110 | 开始生效 |
| EVENT_UPGRADE_SUCCESS | 0x01001111 | 更新成功 |
| EVENT_UPGRADE_FAIL | 0x01010000 | 更新失败 |
| 参数名 | 默认值 | 说明 |
| ---------------------- | ---------- | ------ |
| EVENT_TASK_BASE | 0x01000000 | 任务事件 |
| EVENT_TASK_RECEIVE | 0x01000001 | 收到任务 |
| EVENT_TASK_CANCEL | 0x01000010 | 取消任务 |
| EVENT_DOWNLOAD_WAIT | 0x01000011 | 待下载 |
| EVENT_DOWNLOAD_START | 0x01000100 | 开始下载 |
| EVENT_DOWNLOAD_UPDATE | 0x01000101 | 下载进度更新 |
| EVENT_DOWNLOAD_PAUSE | 0x01000110 | 下载暂停 |
| EVENT_DOWNLOAD_RESUME | 0x01000111 | 恢复下载 |
| EVENT_DOWNLOAD_SUCCESS | 0x01001000 | 下载成功 |
| EVENT_DOWNLOAD_FAIL | 0x01001001 | 下载失败 |
| EVENT_UPGRADE_WAIT | 0x01001010 | 待升级 |
| EVENT_UPGRADE_START | 0x01001011 | 开始升级 |
| EVENT_UPGRADE_UPDATE | 0x01001100 | 升级中 |
| EVENT_APPLY_WAIT | 0x01001101 | 待生效 |
| EVENT_APPLY_START | 0x01001110 | 开始生效 |
| EVENT_UPGRADE_SUCCESS | 0x01001111 | 更新成功 |
| EVENT_UPGRADE_FAIL | 0x01010000 | 更新失败 |
......@@ -34,9 +34,9 @@ Image(src: string | PixelMap | Resource)
**参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------ | ------------------------------------------------------------ | ---- | ------ | ------------------------------------------------------------ |
| src | string\|&nbsp;[PixelMap](../apis/js-apis-image.md#pixelmap7)\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 是 | - | 图片的数据源,支持本地图片和网络图片。<br/>当使用相对路径引用图片资源时,例如`Image("common/test.jpg")`,不支持该Image组件被跨包/跨模块调用,建议使用`$r`方式来管理需全局使用的图片资源。<br/>\- 支持的图片格式包括png、jpg、bmp、svg和gif。<br/>\- 支持`Base64`字符串。格式`data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data]`, 其中`[base64 data]``Base64`字符串数据。<br/>\- 支持`dataability://`路径前缀的字符串,用于访问通过data&nbsp;ability提供的图片路径。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ---- | ---------------------------------------- | ---- | ---- | ---------------------------------------- |
| src | string\|&nbsp;[PixelMap](../apis/js-apis-image.md#pixelmap7)\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 是 | - | 图片的数据源,支持本地图片和网络图片。<br/>当使用相对路径引用图片资源时,例如`Image("common/test.jpg")`,不支持该Image组件被跨包/跨模块调用,建议使用`$r`方式来管理需全局使用的图片资源。<br/>\- 支持的图片格式包括png、jpg、bmp、svg和gif。<br/>\- 支持`Base64`字符串。格式`data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data]`, 其中`[base64 data]``Base64`字符串数据。<br/>\- 支持`dataability://`路径前缀的字符串,用于访问通过data&nbsp;ability提供的图片路径。 |
## 属性
......@@ -45,7 +45,7 @@ Image(src: string | PixelMap | Resource)
| 名称 | 参数类型 | 默认值 | 描述 |
| --------------------- | ---------------------------------------- | ------------------------ | ---------------------------------------- |
| alt | string \| [Resource](../../ui/ts-types.md#resource类型) | - | 加载时显示的占位图,支持本地图片和网络图片。 |
| objectFit | [ImageFit](#imagefit枚举说明) | ImageFit.Cover | 设置图片的缩放类型。 |
| objectFit | ImageFit | ImageFit.Cover | 设置图片的缩放类型。 |
| objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | 设置图片的重复样式。<br/>> **说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。 |
| interpolation | [ImageInterpolation](#imageinterpolation) | ImageInterpolation.None | 设置图片的插值效果,仅针对图片放大插值。<br/>>&nbsp;**说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。<br/>>&nbsp;-&nbsp;PixelMap资源不支持该属性。 |
| renderMode | [ImageRenderMode](#imagerendermode) | ImageRenderMode.Original | 设置图片渲染的模式。<br/>>&nbsp;**说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。 |
......
......@@ -41,34 +41,20 @@ ohos.permission.INTEGRATED_INTERIOR_WINDOW
## 接口
AbilityComponent(value: {want : Want, controller? : AbilityController})
AbilityComponent(value: {want : Want})
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| want | [Want](../../reference/apis/js-apis-application-Want.md) | 是 | - | 默认加载的Ability描述。 |
| controller | [AbilityController](#abilityController) | 否 | - | Ability控制器。 |
## 事件
| 名称 | 功能描述 |
| -------- | -------- |
| onReady()&nbsp;=&gt;&nbsp;void | AbilityComponent环境启动完成时的回调,之后可使用AbilityComponent的方法。 |
| onDestroy()&nbsp;=&gt;&nbsp;void | AbilityComponent环境销毁时的回调。 |
| onAbilityCreated(name:&nbsp;string)&nbsp;=&gt;&nbsp;void | 加载Ability时触发,name为Ability名。 |
| onAbilityMoveToFont()&nbsp;=&gt;&nbsp;void | 当Ability移动到前台时触发。 |
| onAbilityWillRemove()&nbsp;=&gt;&nbsp;void | Ability移除之前触发。 |
## AbilityController
Ability控制器,提供AbilityComponent的控制接口。
| 名称 | 功能描述 |
| --------------------------------------- | ------------------------------------------------------------ |
| startAbility()&nbsp;=&gt;&nbsp;want | 在AbilityComponent内部加载Ability。<br>want:要加载的Ability描述信息。 |
| preformBackPress()&nbsp;=&gt;&nbsp;void | 在AbilityComponent内部执行返回操作。 |
| getStackCount()&nbsp;=&gt;&nbsp;void | 获取AbilityComponent内部任务栈中任务的个数。 |
| onConnect()&nbsp;=&gt;&nbsp;void | AbilityComponent环境启动完成时的回调,之后可使用AbilityComponent的方法。 |
| onDisconnect()&nbsp;=&gt;&nbsp;void | AbilityComponent环境销毁时的回调。 |
## 示例
......@@ -78,7 +64,6 @@ Ability控制器,提供AbilityComponent的控制接口。
@Entry
@Component
struct MyComponent {
@State controller: AbilityController = new AbilityController()
build() {
Column() {
......@@ -87,26 +72,12 @@ struct MyComponent {
bundleName: '',
abilityName: ''
},
controller: this.controller
})
.onReady(() => {
console.log('AbilityComponent ready');
})
.onDestory(() => {
console.log('AbilityComponent destory');
})
Button("Start New")
.onClick(() => {
this.controller.startAbility({
bundleName: '',
abilityName: ''
});
.onConnect(() => {
console.log('AbilityComponent connect');
})
Button("Back")
.onClick(() => {
if (this.controller.getStacjCount() > 1) {
this.controller.preformBackPress();
}
.onDisconnect(() => {
console.log('AbilityComponent disconnect');
})
}
}
......
......@@ -23,9 +23,9 @@ Column(value:{space?: Length})
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| space | Length | 否 | 0 | 纵向布局元素间距。 |
| space | Length | 否 | 0 | 纵向布局元素间距。 |
## 属性
......@@ -33,13 +33,13 @@ Column(value:{space?: Length})
| 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- |
| alignItems | HorizontalAlign | HorizontalAlign.Center | 设置子组件在水平方向上的对齐格式。 |
| justifyContent8+ | [FlexAlign](ts-container-flex.md) | FlexAlign.Start | 设置子组件在垂直方向上的对齐格式。 |
| justifyContent<sup>8+</sup> | [FlexAlign](ts-container-flex.md) | FlexAlign.Start | 设置子组件在垂直方向上的对齐格式。 |
- HorizontalAlign枚举说明
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| Start | 按照语言方向起始端对齐。 |
| Center | 居中对齐,默认对齐方式。 |
| Start | 按照语言方向起始端对齐。 |
| Center | 居中对齐,默认对齐方式。 |
| End | 按照语言方向末端对齐。 |
......
......@@ -3,7 +3,8 @@
应用弹性方式布局子组件的容器组件。
> **说明:**
> 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> - 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> - Flex组件在设置flexShrink、flexGrow时存在二次布局过程,因此在对性能有严格要求的场景下建议使用[Column](ts-container-column.md)、[Row](ts-container-row.md)代替。
## 权限列表
......@@ -47,14 +48,14 @@ Flex(options?: { direction?: FlexDirection, wrap?: FlexWrap, justifyContent?: F
| WrapReverse | Flex容器的元素反向多行/列排布,子项允许超出容器。 |
- FlexAlign枚举说明
| 名称 | 描述 |
| ------------ | ---------------------------------------- |
| Start | 元素在主轴方向首端对齐,&nbsp;第一个元素与行首对齐,同时后续的元素与前一个对齐。 |
| Center | 元素在主轴方向中心对齐,第一个元素与行首的距离与最后一个元素与行尾距离相同。 |
| End | 元素在主轴方向尾部对齐,&nbsp;&nbsp;最后一个元素与行尾对齐,其他元素与后一个对齐。 |
| SpaceBetween | Flex主轴方向均匀分配弹性元素,相邻元素之间距离相同。&nbsp;第一个元素与行首对齐,最后一个元素与行尾对齐。 |
| SpaceAround | Flex主轴方向均匀分配弹性元素,相邻元素之间距离相同。&nbsp;第一个元素到行首的距离和最后一个元素到行尾的距离是相邻元素之间距离的一半。 |
| SpaceEvenly | Flex主轴方向元素等间距布局,&nbsp;相邻元素之间的间距、第一个元素与行首的间距、最后一个元素到行尾的间距都完全一样。 |
| 名称 | 描述 |
| ------------ | ------------------------------------------------------------ |
| Start | 元素在主轴方向首端对齐第一个元素与行首对齐,同时后续的元素与前一个对齐。 |
| Center | 元素在主轴方向中心对齐,第一个元素与行首的距离与最后一个元素与行尾距离相同。 |
| End | 元素在主轴方向尾部对齐最后一个元素与行尾对齐,其他元素与后一个对齐。 |
| SpaceBetween | Flex主轴方向均匀分配弹性元素,相邻元素之间距离相同。第一个元素与行首对齐,最后一个元素与行尾对齐。 |
| SpaceAround | Flex主轴方向均匀分配弹性元素,相邻元素之间距离相同。第一个元素到行首的距离和最后一个元素到行尾的距离是相邻元素之间距离的一半。 |
| SpaceEvenly | Flex主轴方向元素等间距布局,相邻元素之间的间距、第一个元素与行首的间距、最后一个元素到行尾的间距都完全一样。 |
## 示例
......
# Scroll
> **说明:**
> 该组件从API version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> - 该组件从API version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> - 该组件嵌套List子组件滚动时,若List不设置宽高,则默认全部加载,在对性能有要求的场景下建议指定List的宽高。
可滚动的容器组件,当子组件的布局尺寸超过父组件的视口时,内容可以滚动。
......
......@@ -29,10 +29,10 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro
| controller | [TabsController](#tabscontroller) | 否 | - | 设置Tabs控制器。 |
- BarPosition枚举说明
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| Start | vertical属性方法设置为true时,页签位于容器左侧;vertical属性方法设置为false时,页签位于容器顶部。 |
| End | vertical属性方法设置为true时,页签位于容器右侧;vertical属性方法设置为false时,页签位于容器底部。 |
| Start | vertical属性方法设置为true时,页签位于容器左侧;vertical属性方法设置为false时,页签位于容器顶部。 |
| End | vertical属性方法设置为true时,页签位于容器右侧;vertical属性方法设置为false时,页签位于容器底部。 |
## 属性
......@@ -41,25 +41,25 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro
| 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- |
| vertical | boolean | 是否为纵向Tab,默认为false。 | 是否为纵向Tab,默认为false。 |
| scrollable | boolean | 是否可以通过左右滑动进行页面切换,默认为true。 | 是否可以通过左右滑动进行页面切换,默认为true。 |
| barMode | BarMode | TabBar布局模式。 | TabBar布局模式。 |
| barWidth | number | TabBar的宽度值,不设置时使用系统主题中的默认值。 | TabBar的宽度值,不设置时使用系统主题中的默认值。 |
| barHeight | number | TabBar的高度值,不设置时使用系统主题中的默认值。 | TabBar的高度值,不设置时使用系统主题中的默认值。 |
| vertical | boolean | false | 是否为纵向Tab,默认为false。 |
| scrollable | boolean | true | 是否可以通过左右滑动进行页面切换,默认为true。 |
| barMode | BarMode | BarMode.Fixed | TabBar布局模式。 |
| barWidth | number | - | TabBar的宽度值,不设置时使用系统主题中的默认值。 |
| barHeight | number | - | TabBar的高度值,不设置时使用系统主题中的默认值。 |
| animationDuration | number | 200 | TabContent滑动动画时长。 |
- BarMode枚举说明
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| Scrollable | TabBar使用实际布局宽度,&nbsp;超过总长度后可滑动。 |
| Fixed | 所有TabBar平均分配宽度。 |
| Scrollable | TabBar使用实际布局宽度,&nbsp;超过总长度后可滑动。 |
| Fixed | 所有TabBar平均分配宽度。 |
## 事件
| 名称 | 功能描述 |
| 名称 | 功能描述 |
| -------- | -------- |
| onChange(callback:&nbsp;(index:&nbsp;number)&nbsp;=&gt;&nbsp;void) | Tab页签切换后触发的事件。 |
| onChange(callback:&nbsp;(index:&nbsp;number)&nbsp;=&gt;&nbsp;void) | Tab页签切换后触发的事件。 |
## TabsController
......@@ -79,7 +79,7 @@ changeIndex(value: number): void
控制Tabs切换到指定页签。
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 |
......
......@@ -16,7 +16,7 @@
| 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- |
| visibility | Visibility | Visibility.Visible | 控制当前组件显示或隐藏。 |
| visibility | Visibility | Visibility.Visible | 控制当前组件显示或隐藏。注意,即使组件处于隐藏状态,在页面刷新时仍存在重新创建过程,因此当对性能有严格要求时建议使用[条件渲染](../../ui/ts-rending-control-syntax-if-else.md)代替。|
- Visibility枚举说明
......
......@@ -2,7 +2,7 @@
组件可见区域变化事件指组件在屏幕中显示的面积变化,提供了判断组件是否完全或部分显示在屏幕中的能力,通常适用于像广告曝光埋点之类的场景。
> **说明:**从API Version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
> **说明:** 从API Version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
## 权限列表
......
......@@ -37,8 +37,8 @@
| -------------- | -------------------------- | ------------------- |
| width | number | 目标元素的宽度,单位为vp。 |
| height | number | 目标元素的高度,单位为vp。 |
| position | [Position](#position8对象说明) | 目标元素左上角相对父元素左上角的位置。 |
| globalPosition | [Position](#position8对象说明) | 目标元素左上角相对页面左上角的位置。 |
| position | Position | 目标元素左上角相对父元素左上角的位置。 |
| globalPosition | Position | 目标元素左上角相对页面左上角的位置。 |
## Position<sup>8+</sup>对象说明
| 属性名称 | 参数类型 | 描述 |
......
......@@ -26,6 +26,6 @@ FA应用的eTS模块(entry/src/main)的典型开发目录结构如下:
> **说明:**
>
> - 资源目录resources文件夹位于src/main下,此目录下资源文件的详细规范以及子目录结构规范参看[资源文件的分类](basic-resource-file-categories.md)。
> - 资源目录resources文件夹位于src/main下,此目录下资源文件的详细规范以及子目录结构规范参看[资源文件的分类](ui-ts-basic-resource-file-categories.md)。
>
> - 页面支持导入TypeScript和JavaScript文件。
# 循环渲染
开发框架提供循环渲染(ForEach组件)来迭代数组,并为每个数组项创建相应的组件。ForEach定义如下:
开发框架提供循环渲染(ForEach组件)来迭代数组,并为每个数组项创建相应的组件。当循环渲染的元素较多时,会出现页面加载变慢的情况,出于性能考虑,建议使用[LazyForEach](ts-rending-control-syntax-lazyforeach.md)代替。ForEach定义如下:
```ts
......
......@@ -60,7 +60,7 @@
资源引用类型,用于设置组件属性的值。
可以通过`$r`或者`$rawfile`创建Resource类型对象,详见[资源访问](ts-application-resource-access.md)
可以通过`$r`或者`$rawfile`创建Resource类型对象,详见[资源访问](ts-resource-access.md)
- `$r('belonging.type.name')`
......
......@@ -638,7 +638,7 @@ export default {
img.src = 'common/images/2.png';
// 设置图片宽度
img.width= 150;
// 设置图高度
// 设置图高度
img.height=150;
// 图片平铺容器
var pat = ctx.createPattern(img, 'repeat');ctx.fillStyle = pat;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册