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

!10123 拼写错误修改

Merge pull request !10123 from LiAn/master
...@@ -22,8 +22,8 @@ import sensor from '@system.sensor'; ...@@ -22,8 +22,8 @@ import sensor from '@system.sensor';
## Error Codes ## Error Codes
| Error Code | Description | | Error Code | Description |
| ---- | -------------- | | ---------- | ---------------------------------------- |
| 900 | The current device does not support the corresponding sensor.| | 900 | The current device does not support the corresponding sensor. |
## sensor.subscribeAccelerometer ## sensor.subscribeAccelerometer
...@@ -38,18 +38,18 @@ Subscribes to data changes of the acceleration sensor. If this API is called mul ...@@ -38,18 +38,18 @@ Subscribes to data changes of the acceleration sensor. If this API is called mul
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | ---- | ---------------------------------------- | | -------- | -------- | --------- | ---------------------------------------- |
| interval | string | Yes | Execution frequency of the callback for returning the acceleration sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.| | interval | string | Yes | Execution frequency of the callback for returning the acceleration sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
| success | Function | Yes | Called when the acceleration sensor data changes. | | success | Function | Yes | Called when the acceleration sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ---- | ------ | ------- | | ---- | ------ | --------------------------- |
| x | number | Acceleration on the x-axis.| | x | number | Acceleration on the x-axis. |
| y | number | Acceleration on the y-axis.| | y | number | Acceleration on the y-axis. |
| z | number | Acceleration on the z-axis.| | z | number | Acceleration on the z-axis. |
**Example** **Example**
...@@ -98,15 +98,15 @@ Subscribes to data changes of the compass sensor. If this API is called multiple ...@@ -98,15 +98,15 @@ Subscribes to data changes of the compass sensor. If this API is called multiple
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | --------------- | | ------- | -------- | --------- | ---------------------------------------- |
| success | Function | Yes | Called when the compass sensor data changes.| | success | Function | Yes | Called when the compass sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | ---------- | | --------- | ------ | ------------------------------------ |
| direction | number | Direction of the device, in degrees.| | direction | number | Direction of the device, in degrees. |
**Example** **Example**
...@@ -150,15 +150,15 @@ Subscribes to data changes of the proximity sensor. If this API is called multip ...@@ -150,15 +150,15 @@ Subscribes to data changes of the proximity sensor. If this API is called multip
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | ----------------- | | ------- | -------- | --------- | ---------------------------------------- |
| success | Function | Yes | Called when the proximity sensor data changes.| | success | Function | Yes | Called when the proximity sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| -------- | ------ | --------------------- | | -------- | ------ | ---------------------------------------- |
| distance | number | Distance between a visible object and the device screen.| | distance | number | Distance between a visible object and the device screen. |
**Example** **Example**
...@@ -202,15 +202,15 @@ Subscribes to data changes of the ambient light sensor. If this API is called mu ...@@ -202,15 +202,15 @@ Subscribes to data changes of the ambient light sensor. If this API is called mu
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | --------------- | | ------- | -------- | --------- | ---------------------------------------- |
| success | Function | Yes | Called when the ambient light sensor data changes| | success | Function | Yes | Called when the ambient light sensor data changes |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | ------------ | | --------- | ------ | ------------------------ |
| intensity | number | Light intensity, in lux.| | intensity | number | Light intensity, in lux. |
**Example** **Example**
...@@ -256,15 +256,15 @@ Subscribes to data changes of the step counter sensor. If this API is called mul ...@@ -256,15 +256,15 @@ Subscribes to data changes of the step counter sensor. If this API is called mul
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | ---------------- | | ------- | -------- | --------- | ---------------------------------------- |
| success | Function | Yes | Called when the step counter sensor data changes.| | success | Function | Yes | Called when the step counter sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------ | --------------------- | | ----- | ------ | ---------------------------------------- |
| steps | number | Number of counted steps after the sensor is restarted.<br>| | steps | number | Number of counted steps after the sensor is restarted.<br> |
**Example** **Example**
...@@ -302,7 +302,7 @@ sensor.unsubscribeStepCounter(); ...@@ -302,7 +302,7 @@ sensor.unsubscribeStepCounter();
## sensor.subscribeBarometer ## sensor.subscribeBarometer
subcribeBarometer(Object): void subscribeBarometer(Object): void
Subscribes to data changes of the barometer sensor. If this API is called multiple times for the same application, the last call takes effect. Subscribes to data changes of the barometer sensor. If this API is called multiple times for the same application, the last call takes effect.
...@@ -311,15 +311,15 @@ Subscribes to data changes of the barometer sensor. If this API is called multip ...@@ -311,15 +311,15 @@ Subscribes to data changes of the barometer sensor. If this API is called multip
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | ---------------- | | ------- | -------- | --------- | ---------------------------------------- |
| success | Function | Yes | Called when the barometer sensor data changes.| | success | Function | Yes | Called when the barometer sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| -------- | ------ | ----------- | | -------- | ------ | -------------------- |
| pressure | number | Pressure, in pascal.| | pressure | number | Pressure, in pascal. |
**Example** **Example**
...@@ -367,15 +367,15 @@ Subscribes to data changes of the heart rate sensor. If this API is called multi ...@@ -367,15 +367,15 @@ Subscribes to data changes of the heart rate sensor. If this API is called multi
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | ------------------------- | | ------- | -------- | --------- | ---------------------------------------- |
| success | Function | Yes | Called when the heart rate sensor data changes. This callback is invoked every five seconds.| | success | Function | Yes | Called when the heart rate sensor data changes. This callback is invoked every five seconds. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | ---- | | --------- | ------ | ----------- |
| heartRate | number | Heart rate.| | heartRate | number | Heart rate. |
**Example** **Example**
...@@ -422,15 +422,15 @@ Subscribes to changes of the wearing state of a wearable device. If this API is ...@@ -422,15 +422,15 @@ Subscribes to changes of the wearing state of a wearable device. If this API is
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | ---- | ------------- | | ------- | -------- | --------- | -------------------------------------- |
| success | Function | Yes | Called when the wearing state changes.| | success | Function | Yes | Called when the wearing state changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------- | ------ | | ----- | ------- | ------------------------------------ |
| value | boolean | Whether the wearable device is worn.| | value | boolean | Whether the wearable device is worn. |
**Example** **Example**
...@@ -474,16 +474,16 @@ Obtains the wearing state of a wearable device. ...@@ -474,16 +474,16 @@ Obtains the wearing state of a wearable device.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | ---- | ------------ | | -------- | -------- | --------- | -------------------------------------- |
| success | Function | No | Callback upon success.| | success | Function | No | Callback upon success. |
| fail | Function | No | Callback upon failure.| | fail | Function | No | Callback upon failure. |
| complete | Function | No | Called when the execution is complete.| | complete | Function | No | Called when the execution is complete. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------- | ------ | | ----- | ------- | ------------------------------------ |
| value | boolean | Whether the wearable device is worn.| | value | boolean | Whether the wearable device is worn. |
**Example** **Example**
...@@ -511,17 +511,17 @@ If this API is called multiple times for the same application, the last call tak ...@@ -511,17 +511,17 @@ If this API is called multiple times for the same application, the last call tak
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | ---- | ---------------------------------------- | | -------- | -------- | --------- | ---------------------------------------- |
| interval | string | Yes | Interval at which the callback is invoked to return the device orientation sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.| | interval | string | Yes | Interval at which the callback is invoked to return the device orientation sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
| success | Function | Yes | Called when the device orientation sensor data changes. | | success | Function | Yes | Called when the device orientation sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------ | ---------------------------------------- | | ----- | ------ | ---------------------------------------- |
| alpha | number | Rotation angle around the Z axis when the X/Y axis of the device coincides with the X/Y axis of the earth.| | alpha | number | Rotation angle around the Z axis when the X/Y axis of the device coincides with the X/Y axis of the earth. |
| beta | number | Rotation angle around the X axis when the Y/Z axis of the device coincides with the Y/Z axis of the earth.| | beta | number | Rotation angle around the X axis when the Y/Z axis of the device coincides with the Y/Z axis of the earth. |
| gamma | number | Rotation angle around the Y axis when the X/Z axis of the device coincides with the X/Z axis of the earth.| | gamma | number | Rotation angle around the Y axis when the X/Z axis of the device coincides with the X/Z axis of the earth. |
**Example** **Example**
...@@ -572,18 +572,18 @@ If this API is called multiple times for the same application, the last call tak ...@@ -572,18 +572,18 @@ If this API is called multiple times for the same application, the last call tak
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | ---- | ---------------------------------------- | | -------- | -------- | --------- | ---------------------------------------- |
| interval | string | Yes | Interval at which the callback is invoked to return the gyroscope sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.| | interval | string | Yes | Interval at which the callback is invoked to return the gyroscope sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
| success | Function | Yes | Called when the gyroscope sensor data changes. | | success | Function | Yes | Called when the gyroscope sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ---- | ------ | --------- | | ---- | ------ | ---------------------------------------- |
| x | number | Rotation angular velocity of the X axis.| | x | number | Rotation angular velocity of the X axis. |
| y | number | Rotation angular velocity of the Y axis.| | y | number | Rotation angular velocity of the Y axis. |
| z | number | Rotation angular velocity of the Z axis.| | z | number | Rotation angular velocity of the Z axis. |
**Example** **Example**
......
...@@ -21,18 +21,18 @@ Not supported ...@@ -21,18 +21,18 @@ Not supported
In addition to the [universal attributes](../arkui-js/js-components-common-attributes.md), the following attributes are supported. In addition to the [universal attributes](../arkui-js/js-components-common-attributes.md), the following attributes are supported.
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------------------------------- | ----------------------- | --------- | ---- | ---------------------------------------- | | -------------------------------- | ----------------------- | ------------- | --------- | ---------------------------------------- |
| type | string | text<br>| No | Type of the input component. Available values include **text**, **email**, **date**, **time**, **number**, **password**, **button**, **checkbox**, and **radio**.<br>The **text**, **email**, **date**, **time**, **number**, and **password** types can be dynamically switched and modified.<br>The **button**, **checkbox**, and **radio** types cannot be dynamically modified. <br>- **button**: a button that can be clicked.<br>- **checkbox**: a check box.<br>- **radio**: a radio button that allows users to select one from multiple others with the same name.<br>- **text**: a single-line text field.<br>- **email**: a field used for an email address.<br>- **date**: date component, including the year, month, and day, but excluding time.<br>- **time**: time component, without the time zone.<br>- **number**: field for entering digits.<br>- **password**: password field, in which characters will be shielded.| | type | string | text<br> | No | Type of the input component. Available values include **text**, **email**, **date**, **time**, **number**, **password**, **button**, **checkbox**, and **radio**.<br>The **text**, **email**, **date**, **time**, **number**, and **password** types can be dynamically switched and modified.<br>The **button**, **checkbox**, and **radio** types cannot be dynamically modified. <br>- **button**: a button that can be clicked.<br>- **checkbox**: a check box.<br>- **radio**: a radio button that allows users to select one from multiple others with the same name.<br>- **text**: a single-line text field.<br>- **email**: a field used for an email address.<br>- **date**: date component, including the year, month, and day, but excluding time.<br>- **time**: time component, without the time zone.<br>- **number**: field for entering digits.<br>- **password**: password field, in which characters will be shielded. |
| checked | boolean | false | No | Whether the **\<input>** component is selected. This attribute is valid only when **type** is set to **checkbox** or **radio**. | | checked | boolean | false | No | Whether the **\<input>** component is selected. This attribute is valid only when **type** is set to **checkbox** or **radio**. |
| name | string | - | No | Name of the **\<input>** component.<br>This attribute is mandatory when **type** is set to **radio**. | | name | string | - | No | Name of the **\<input>** component.<br>This attribute is mandatory when **type** is set to **radio**. |
| value | string | - | No | Value of the **\<input>** component. When **type** is **radio**, this attribute is mandatory and the value must be unique for radio buttons with the same name.| | value | string | - | No | Value of the **\<input>** component. When **type** is **radio**, this attribute is mandatory and the value must be unique for radio buttons with the same name. |
| placeholder | string | - | No | Content of the hint text. This attribute is available only when the component type is set to **text** \|email\|date\|time\|number\|**password**.| | placeholder | string | - | No | Content of the hint text. This attribute is available only when the component type is set to **text** \|email\|date\|time\|number\|**password**. |
| maxlength | number | - | No | Maximum number of characters that can be entered in the input box. The empty value indicates no limit. | | maxlength | number | - | No | Maximum number of characters that can be entered in the input box. The empty value indicates no limit. |
| enterkeytype | string | default | No | Type of the **Enter** key on the soft keyboard. The value cannot be dynamically updated.<br>Available values include:<br>- default<br>- next<br>- go<br>- done<br>- send<br>- search<br>Except for the **next** type, clicking the Enter key hides the soft keyboard.| | enterkeytype | string | default | No | Type of the **Enter** key on the soft keyboard. The value cannot be dynamically updated.<br>Available values include:<br>- default<br>- next<br>- go<br>- done<br>- send<br>- search<br>Except for the **next** type, clicking the Enter key hides the soft keyboard. |
| headericon | string | - | No | Icon resource path before text input. This icon does not support click events and is unavailable for **button**, **checkbox**, and **radio** types. The supported icon image formats are JPG, PNG, and SVG.| | headericon | string | - | No | Icon resource path before text input. This icon does not support click events and is unavailable for **button**, **checkbox**, and **radio** types. The supported icon image formats are JPG, PNG, and SVG. |
| showcounter<sup>5+</sup> | boolean | false | No | Whether to display the character counter for an input box. This attribute takes effect only when **maxlength** is set. | | showcounter<sup>5+</sup> | boolean | false | No | Whether to display the character counter for an input box. This attribute takes effect only when **maxlength** is set. |
| menuoptions<sup>5+</sup> | Array&lt;MeunOption&gt; | - | No | Menu options displayed after users click the **More** button. | | menuoptions<sup>5+</sup> | Array&lt;MenuOption&gt; | - | No | Menu options displayed after users click the **More** button. |
| autofocus<sup>6+</sup> | boolean | false | No | Whether to automatically obtain focus.<br>This attribute setting does not take effect on the application home page. You can enable a text box on the home page to automatically obtain focus, by delaying the **focus** method call (for about 100–500 ms) in **onActive**.| | autofocus<sup>6+</sup> | boolean | false | No | Whether to automatically obtain focus.<br>This attribute setting does not take effect on the application home page. You can enable a text box on the home page to automatically obtain focus, by delaying the **focus** method call (for about 100–500 ms) in **onActive**. |
| selectedstart<sup>6+</sup> | number | -1 | No | Start position for text selection. | | selectedstart<sup>6+</sup> | number | -1 | No | Start position for text selection. |
| selectedend<sup>6+</sup> | number | -1 | No | End position for text selection. | | selectedend<sup>6+</sup> | number | -1 | No | End position for text selection. |
| softkeyboardenabled<sup>6+</sup> | boolean | true | No | Whether to display the soft keyboard during editing. | | softkeyboardenabled<sup>6+</sup> | boolean | true | No | Whether to display the soft keyboard during editing. |
...@@ -41,9 +41,9 @@ In addition to the [universal attributes](../arkui-js/js-components-common-attri ...@@ -41,9 +41,9 @@ In addition to the [universal attributes](../arkui-js/js-components-common-attri
**Table 1** MenuOption<sup>5+</sup> **Table 1** MenuOption<sup>5+</sup>
| Name | Type | Description | | Name | Type | Description |
| ------- | ------ | ----------- | | ------- | ------ | ----------------------------------- |
| icon | string | Path of the icon for a menu option.| | icon | string | Path of the icon for a menu option. |
| content | string | Text content of a menu option.| | content | string | Text content of a menu option. |
## Styles ## Styles
...@@ -51,10 +51,10 @@ In addition to the [universal attributes](../arkui-js/js-components-common-attri ...@@ -51,10 +51,10 @@ In addition to the [universal attributes](../arkui-js/js-components-common-attri
In addition to the [universal styles](../arkui-js/js-components-common-styles.md), the following styles are supported. In addition to the [universal styles](../arkui-js/js-components-common-styles.md), the following styles are supported.
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| ------------------------ | -------------------------- | ---------- | ---- | ---------------------------------------- | | ------------------------ | ---------------- | ------------- | --------- | ---------------------------------------- |
| color | &lt;color&gt; | \#e6000000 | No | Font color of the single-line text box or button. | | color | &lt;color&gt; | \#e6000000 | No | Font color of the single-line text box or button. |
| font-size | &lt;length&gt; | 16px | No | Font size of the single-line text box or button. | | font-size | &lt;length&gt; | 16px | No | Font size of the single-line text box or button. |
| allow-scale | boolean | true | No | Whether the font size changes with the system's font size settings.<br>If the **config-changes** tag of **fontSize** is configured for abilities in the **config.json** file, the setting takes effect without application restart.| | allow-scale | boolean | true | No | Whether the font size changes with the system's font size settings.<br>If the **config-changes** tag of **fontSize** is configured for abilities in the **config.json** file, the setting takes effect without application restart. |
| placeholder-color | &lt;color&gt; | \#99000000 | No | Color of the hint text in the single-line text box. This attribute is available only when **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**. | | placeholder-color | &lt;color&gt; | \#99000000 | No | Color of the hint text in the single-line text box. This attribute is available only when **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**. |
| font-weight | number \| string | normal | No | Font weight of the single-line text box or button. For details, see **font-weight** of the [**\<text>**](../arkui-js/js-components-basic-text.md) component. | | font-weight | number \| string | normal | No | Font weight of the single-line text box or button. For details, see **font-weight** of the [**\<text>**](../arkui-js/js-components-basic-text.md) component. |
| caret-color<sup>6+</sup> | &lt;color&gt; | - | No | Color of the caret. | | caret-color<sup>6+</sup> | &lt;color&gt; | - | No | Color of the caret. |
...@@ -68,19 +68,19 @@ In addition to the [universal events](../arkui-js/js-components-common-events.md ...@@ -68,19 +68,19 @@ In addition to the [universal events](../arkui-js/js-components-common-events.md
| Name | Parameter | Description | | Name | Parameter | Description |
| ------------------------- | ---------------------------------------- | ---------------------------------------- | | ------------------------- | ---------------------------------------- | ---------------------------------------- |
| change | {<br> value: inputValue<br> } | Triggered when the content entered in the input box changes. The most recent content entered by the user is returned.<br>If you change the **value** attribute directly, this event will not be triggered.| | change | {<br> value: inputValue<br> } | Triggered when the content entered in the input box changes. The most recent content entered by the user is returned.<br>If you change the **value** attribute directly, this event will not be triggered. |
| enterkeyclick | {<br> value: enterKey<br> } | Triggered when the **Enter** key on the soft keyboard is clicked. The type of the **Enter** key is returned, which is of the number type. Available values are as follows:<br>- **2**: returned if **enterkeytype** is **go**.<br>- **3**: returned if **enterkeytype** is **search**.<br>- **4**: returned if **enterkeytype** is **send**.<br>- **5**: returned if **enterkeytype** is **next**.<br>- **6**: returned if **enterkeytype** is **default**, **done**, or is not set.| | enterkeyclick | {<br> value: enterKey<br> } | Triggered when the **Enter** key on the soft keyboard is clicked. The type of the **Enter** key is returned, which is of the number type. Available values are as follows:<br>- **2**: returned if **enterkeytype** is **go**.<br>- **3**: returned if **enterkeytype** is **search**.<br>- **4**: returned if **enterkeytype** is **send**.<br>- **5**: returned if **enterkeytype** is **next**.<br>- **6**: returned if **enterkeytype** is **default**, **done**, or is not set. |
| translate<sup>5+</sup> | {<br> value: selectedText<br> } | Triggered when users click the translate button in the menu displayed after they select a text segment. The selected text content is returned.| | translate<sup>5+</sup> | {<br> value: selectedText<br> } | Triggered when users click the translate button in the menu displayed after they select a text segment. The selected text content is returned. |
| share<sup>5+</sup> | {<br> value: selectedText<br> } | Triggered when users click the share button in the menu displayed after they select a text segment. The selected text content is returned.| | share<sup>5+</sup> | {<br> value: selectedText<br> } | Triggered when users click the share button in the menu displayed after they select a text segment. The selected text content is returned. |
| search<sup>5+</sup> | {<br> value: selectedText<br> } | Triggered when users click the search button in the menu displayed after they select a text segment. The selected text content is returned.| | search<sup>5+</sup> | {<br> value: selectedText<br> } | Triggered when users click the search button in the menu displayed after they select a text segment. The selected text content is returned. |
| optionselect<sup>5+</sup> | {<br> index: optionIndex,<br> value: selectedText<br> } | Triggered when users click a menu option in the menu displayed after they select a text segment. This event is valid only when the **menuoptions** attribute is set. The option index and selected text content are returned.| | optionselect<sup>5+</sup> | {<br> index: optionIndex,<br> value: selectedText<br> } | Triggered when users click a menu option in the menu displayed after they select a text segment. This event is valid only when the **menuoptions** attribute is set. The option index and selected text content are returned. |
| selectchange<sup>6+</sup> | {<br>start: number,<br>end: number<br> } | Triggered when the text selection changes. | | selectchange<sup>6+</sup> | {<br>start: number,<br>end: number<br> } | Triggered when the text selection changes. |
- When **type** is set to **checkbox** or **radio**, the following events are supported. - When **type** is set to **checkbox** or **radio**, the following events are supported.
| Name | Parameter | Description | | Name | Parameter | Description |
| ------ | ---------------------------------------- | ---------------------------------------- | | ------ | --------------------------------- | ---------------------------------------- |
| change | {<br> checked:true \| false <br>} | Triggered when the checked status of the **checkbox** or **radio** button changes.| | change | {<br> checked:true \| false <br>} | Triggered when the checked status of the **checkbox** or **radio** button changes. |
## Methods ## Methods
...@@ -88,7 +88,7 @@ In addition to the [universal methods](../arkui-js/js-components-common-methods. ...@@ -88,7 +88,7 @@ In addition to the [universal methods](../arkui-js/js-components-common-methods.
| Name | Parameter | Description | | Name | Parameter | Description |
| ------------------- | ---------------------------------------- | ---------------------------------------- | | ------------------- | ---------------------------------------- | ---------------------------------------- |
| focus | {<br> focus: true\|false<br> }:<br>If **focus** is not passed, the default value **true** is used.| Obtains or loses focus. When **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**, the input method can be displayed or collapsed. | | focus | {<br> focus: true\|false<br> }:<br>If **focus** is not passed, the default value **true** is used. | Obtains or loses focus. When **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**, the input method can be displayed or collapsed. |
| showError | {<br> error: string <br>} | Displays the error message. This method is available when **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**. | | showError | {<br> error: string <br>} | Displays the error message. This method is available when **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**. |
| delete<sup>6+</sup> | - | Deletes text based on the current caret position when **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**; deletes the last character and displays the caret if the current input component does not have a caret. | | delete<sup>6+</sup> | - | Deletes text based on the current caret position when **type** is set to **text**, **email**, **date**, **time**, **number**, or **password**; deletes the last character and displays the caret if the current input component does not have a caret. |
......
...@@ -27,54 +27,54 @@ Not supported ...@@ -27,54 +27,54 @@ Not supported
In addition to the [universal attributes](../arkui-js/js-components-common-attributes.md), the following attributes are supported. In addition to the [universal attributes](../arkui-js/js-components-common-attributes.md), the following attributes are supported.
| Name| Type| Default Value| Mandatory| Description| | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | ------- | ------------- | --------- | ---------------------------------------- |
| muted | boolean | false | No| Whether the video is muted.| | muted | boolean | false | No | Whether the video is muted. |
| src | string | - | No| Path of the video content to play.| | src | string | - | No | Path of the video content to play. |
| autoplay | boolean | false | No| Whether the video is played automatically after being rendered.| | autoplay | boolean | false | No | Whether the video is played automatically after being rendered. |
| controls | boolean | true | No| Whether the control bar is displayed during video playback. If the value is set to **false**, the control bar is not displayed. The default value is **true**, indicating that the platform can either show or hide the control bar.| | controls | boolean | true | No | Whether the control bar is displayed during video playback. If the value is set to **false**, the control bar is not displayed. The default value is **true**, indicating that the platform can either show or hide the control bar. |
## Styles ## Styles
In addition to the [universal styles](../arkui-js/js-components-common-styles.md), the following styles are supported. In addition to the [universal styles](../arkui-js/js-components-common-styles.md), the following styles are supported.
| Name| Type| Default Value| Mandatory| Description| | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | ---------- | ------ | ------------- | --------- | ---------------------------------------- |
| object-fit | string | contain | No| Video scale type. If **poster** has been assigned a value, the setting of this style will affect the scaling type of the video poster. For details, see object-fit enums.| | object-fit | string | contain | No | Video scale type. If **poster** has been assigned a value, the setting of this style will affect the scaling type of the video poster. For details, see object-fit enums. |
**Table 1** object-fit enums **Table 1** object-fit enums
| Type| Description| | Type | Description |
| -------- | -------- | | ---- | ---------------------------------------- |
| fill | The image is resized to fill the display area, and its aspect ratio is not retained.| | fill | The image is resized to fill the display area, and its aspect ratio is not retained. |
## Events ## Events
In addition to the [universal events](../arkui-js/js-components-common-events.md), the following events are supported. In addition to the [universal events](../arkui-js/js-components-common-events.md), the following events are supported.
| Name| Parameter| Description| | Name | Parameter | Description |
| -------- | -------- | -------- | | ---------- | ---------------------------------------- | ---------------------------------------- |
| prepared | {&nbsp;duration:&nbsp;value&nbsp;}<sup>5+</sup> | Triggered when the video preparation is complete. The video duration (in seconds) is obtained from **duration**.| | prepared | {&nbsp;duration:&nbsp;value&nbsp;}<sup>5+</sup> | Triggered when the video preparation is complete. The video duration (in seconds) is obtained from **duration**. |
| start | - | Triggered when the video is played.| | start | - | Triggered when the video is played. |
| pause | - | Triggered when the video playback is paused.| | pause | - | Triggered when the video playback is paused. |
| finish | - | Triggered when the video playback is finished.| | finish | - | Triggered when the video playback is finished. |
| error | - | Triggered when the video playback fails.| | error | - | Triggered when the video playback fails. |
| seeking | {&nbsp;currenttime:&nbsp;value&nbsp;} | Triggered to report the time (in seconds) when the progress bar is being dragged.| | seeking | {&nbsp;currenttime:&nbsp;value&nbsp;} | Triggered to report the time (in seconds) when the progress bar is being dragged. |
| seeked | {&nbsp;currenttime:&nbsp;value&nbsp;} | Triggered to report the playback time (in seconds) when the user finishes dragging the progress bar.| | seeked | {&nbsp;currenttime:&nbsp;value&nbsp;} | Triggered to report the playback time (in seconds) when the user finishes dragging the progress bar. |
| timeupdate | {&nbsp;currenttime:&nbsp;value&nbsp;} | Triggered once per 250 ms when the playback progress changes. The unit of the current playback time is second.| | timeupdate | {&nbsp;currenttime:&nbsp;value&nbsp;} | Triggered once per 250 ms when the playback progress changes. The unit of the current playback time is second. |
## Methods ## Methods
In addition to the [universal methods](../arkui-js/js-components-common-methods.md), the following methods are supported. In addition to the [universal methods](../arkui-js/js-components-common-methods.md), the following methods are supported.
| Name| Parameter| Description| | Name | Parameter | Description |
| -------- | -------- | -------- | | -------------- | ------------------------------------- | ---------------------------------------- |
| start | - | Starts playing a video.| | start | - | Starts playing a video. |
| pause | - | Pauses a video.| | pause | - | Pauses a video. |
| setCurrentTime | {&nbsp;currenttime:&nbsp;value&nbsp;} | Sets the video playback position, in seconds.| | setCurrentTime | {&nbsp;currenttime:&nbsp;value&nbsp;} | Sets the video playback position, in seconds. |
> **NOTE** > **NOTE**
> >
...@@ -87,7 +87,7 @@ In addition to the [universal methods](../arkui-js/js-components-common-methods. ...@@ -87,7 +87,7 @@ In addition to the [universal methods](../arkui-js/js-components-common-methods.
<div class="container"> <div class="container">
<video id='videoId' src='/common/myDeram.mp4' muted='false' autoplay='false' <video id='videoId' src='/common/myDeram.mp4' muted='false' autoplay='false'
controls='true' onprepared='preparedCallback' onstart='startCallback' controls='true' onprepared='preparedCallback' onstart='startCallback'
onpaues='pauesCallback' onfinish='finishCallback' onerror='errorCallback' onpause='pauseCallback' onfinish='finishCallback' onerror='errorCallback'
onseeking='seekingCallback' onseeked='seekedCallback' onseeking='seekingCallback' onseeked='seekedCallback'
ontimeupdate='timeupdateCallback' ontimeupdate='timeupdateCallback'
style="object-fit:fill; width:80%; height:400px;" style="object-fit:fill; width:80%; height:400px;"
......
...@@ -23,9 +23,9 @@ setPointerVisible(visible: boolean, callback: AsyncCallback&lt;void&gt;): void ...@@ -23,9 +23,9 @@ setPointerVisible(visible: boolean, callback: AsyncCallback&lt;void&gt;): void
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ------------------------- | ---- | ------------------------------------------------------------------- | | -------- | ------------------------- | ---- | ---------------------------------------- |
| visible | boolean | 是 | 鼠标指针显示或者隐藏状态,true: 鼠标指针显示; false: 鼠标指针隐藏。 | | visible | boolean | 是 | 鼠标指针显示或者隐藏状态,true: 鼠标指针显示; false: 鼠标指针隐藏。 |
| callback | AysncCallback&lt;void&gt; | 是 | 回调函数。当设置鼠标显示或隐藏成功,err为undefined,否则为错误对象。 | | callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。当设置鼠标显示或隐藏成功,err为undefined,否则为错误对象。 |
**示例** **示例**
...@@ -50,13 +50,13 @@ setPointerVisible(visible: boolean): Promise&lt;void&gt; ...@@ -50,13 +50,13 @@ setPointerVisible(visible: boolean): Promise&lt;void&gt;
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| ------- | ------- | ---- | ------------------------------------------------------------------- | | ------- | ------- | ---- | ---------------------------------------- |
| visible | boolean | 是 | 鼠标指针显示或者隐藏状态,true: 鼠标指针显示; false: 鼠标指针隐藏。 | | visible | boolean | 是 | 鼠标指针显示或者隐藏状态,true: 鼠标指针显示; false: 鼠标指针隐藏。 |
**返回值** **返回值**
| 参数 | 说明 | | 参数 | 说明 |
| ------------------- | ------------------------------- | | ------------------- | ------------------- |
| Promise&lt;void&gt; | Promise实例,用于异步获取结果。 | | Promise&lt;void&gt; | Promise实例,用于异步获取结果。 |
**示例** **示例**
...@@ -80,7 +80,7 @@ isPointerVisible(callback: AsyncCallback&lt;boolean&gt;): void ...@@ -80,7 +80,7 @@ isPointerVisible(callback: AsyncCallback&lt;boolean&gt;): void
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------- | ---- | ---------------------------- | | -------- | ---------------------------- | ---- | -------------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 回调函数,异步返回查询结果。 | | callback | AsyncCallback&lt;boolean&gt; | 是 | 回调函数,异步返回查询结果。 |
**示例** **示例**
...@@ -102,7 +102,7 @@ isPointerVisible(): Promise&lt;boolean&gt; ...@@ -102,7 +102,7 @@ isPointerVisible(): Promise&lt;boolean&gt;
**返回值** **返回值**
| 参数 | 说明 | | 参数 | 说明 |
| ---------------------- | ------------------------------- | | ---------------------- | ------------------- |
| Promise&lt;boolean&gt; | Promise实例,用于异步获取结果。 | | Promise&lt;boolean&gt; | Promise实例,用于异步获取结果。 |
**示例** **示例**
...@@ -124,7 +124,7 @@ setPointerSpeed(speed: number, callback: AsyncCallback&lt;void&gt;): void ...@@ -124,7 +124,7 @@ setPointerSpeed(speed: number, callback: AsyncCallback&lt;void&gt;): void
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ------------------------- | ---- | ------------------------------------------------------------------- | | -------- | ------------------------- | ---- | ------------------------------------- |
| speed | number | 是 | 鼠标移动速度设置挡位值1-11,最大值:11,最小值:1,标准值:5。 | | speed | number | 是 | 鼠标移动速度设置挡位值1-11,最大值:11,最小值:1,标准值:5。 |
| callback | AysncCallback&lt;void&gt; | 是 | 回调函数。当设置鼠标速度成功,err为undefined,否则为错误对象。 | | callback | AysncCallback&lt;void&gt; | 是 | 回调函数。当设置鼠标速度成功,err为undefined,否则为错误对象。 |
...@@ -151,13 +151,13 @@ setPointerSpeed(speed: number): Promise&lt;void&gt; ...@@ -151,13 +151,13 @@ setPointerSpeed(speed: number): Promise&lt;void&gt;
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| ------- | ------- | ---- | ------------------------------------------------------------------- | | ----- | ------ | ---- | ----------------------------------- |
| speed | number | 是 | 鼠标移动速度设置挡位值1-11,最大值:11,最小值:1,标准值:5。 | | speed | number | 是 | 鼠标移动速度设置挡位值1-11,最大值:11,最小值:1,标准值:5。 |
**返回值** **返回值**
| 参数 | 说明 | | 参数 | 说明 |
| ------------------- | ------------------------------- | | ------------------- | ---------------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 | | Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**示例** **示例**
...@@ -181,7 +181,7 @@ getPointerSpeed(callback: AsyncCallback&lt;number&gt;): void ...@@ -181,7 +181,7 @@ getPointerSpeed(callback: AsyncCallback&lt;number&gt;): void
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------- | ---- | ---------------------------- | | -------- | --------------------------- | ---- | -------------- |
| callback | AsyncCallback&lt;number&gt; | 是 | 回调函数,异步返回查询结果。 | | callback | AsyncCallback&lt;number&gt; | 是 | 回调函数,异步返回查询结果。 |
**示例** **示例**
...@@ -203,7 +203,7 @@ getPointerSpeed(): Promise&lt;number&gt; ...@@ -203,7 +203,7 @@ getPointerSpeed(): Promise&lt;number&gt;
**返回值** **返回值**
| 参数 | 说明 | | 参数 | 说明 |
| ---------------------- | ------------------------------- | | --------------------- | ------------------- |
| Promise&lt;number&gt; | Promise实例,用于异步获取结果。 | | Promise&lt;number&gt; | Promise实例,用于异步获取结果。 |
**示例** **示例**
...@@ -225,9 +225,9 @@ getPointerStyle(windowId: number, callback: AsyncCallback&lt;PointerStyle&gt;): ...@@ -225,9 +225,9 @@ getPointerStyle(windowId: number, callback: AsyncCallback&lt;PointerStyle&gt;):
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------------------------------- | | -------- | ---------------------------------------- | ---- | -------------- |
| windowId | number | 是 | 输入设备的窗口id。 | | windowId | number | 是 | 输入设备的窗口id。 |
| callback | AsyncCallback&lt;[PointerStyle](#pointerstyle9)&gt; | 是 | 回调函数,异步返回查询结果。| | callback | AsyncCallback&lt;[PointerStyle](#pointerstyle9)&gt; | 是 | 回调函数,异步返回查询结果。 |
**示例** **示例**
...@@ -257,8 +257,8 @@ getPointerStyle(windowId: number): Promise&lt;PointerStyle&gt; ...@@ -257,8 +257,8 @@ getPointerStyle(windowId: number): Promise&lt;PointerStyle&gt;
**参数** **参数**
| 参数 | 说明 | | 参数 | 说明 |
| -------- | --------------------------------- | | ---------------------------------------- | ------------------- |
| Promise&lt;[PointerStyle](#pointerstyle9)&gt; |Promise实例,用于异步获取结果。| | Promise&lt;[PointerStyle](#pointerstyle9)&gt; | Promise实例,用于异步获取结果。 |
**示例** **示例**
...@@ -289,10 +289,10 @@ setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCal ...@@ -289,10 +289,10 @@ setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCal
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------------| ---- | --------------------------------- | | ------------ | ------------------------------ | ---- | ----------------------------------- |
| windowId | number | 是 | 输入设备的窗口id。 | | windowId | number | 是 | 输入设备的窗口id。 |
| pointerStyle | [PointerStyle](#pointerstyle9) | 是 | 鼠标样式id。 | | pointerStyle | [PointerStyle](#pointerstyle9) | 是 | 鼠标样式id。 |
| callback | AysncCallback&lt;void&gt; | 是 | 回调函数。当设置样式成功,err为undefined,否则为错误对象。| | callback | AysncCallback&lt;void&gt; | 是 | 回调函数。当设置样式成功,err为undefined,否则为错误对象。 |
**示例** **示例**
...@@ -321,10 +321,10 @@ setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise&lt;void&g ...@@ -321,10 +321,10 @@ setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise&lt;void&g
**参数** **参数**
| 参数 | 类型 | 必填 | 说明 | | 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------------------------------- | | ------------------- | ------------------------------ | ---- | ---------------- |
| windowId | number | 是 | 输入设备的窗口id。 | | windowId | number | 是 | 输入设备的窗口id。 |
| pointerStyle | [PointerStyle](#pointerstyle9) | 是 | 鼠标样式id。 | | pointerStyle | [PointerStyle](#pointerstyle9) | 是 | 鼠标样式id。 |
| Promise&lt;void&gt; | void | 是 |无返回结果的Promise对象。 | | Promise&lt;void&gt; | void | 是 | 无返回结果的Promise对象。 |
**示例** **示例**
...@@ -349,10 +349,10 @@ window.getTopWindow((err, data) => { ...@@ -349,10 +349,10 @@ window.getTopWindow((err, data) => {
**系统能力**:SystemCapability.MultimodalInput.Input.Pointer **系统能力**:SystemCapability.MultimodalInput.Input.Pointer
| 名称 | 值 | 说明 | | 名称 | 值 | 说明 |
| ------------------- | ---- | --------- | | -------------------------------- | ---- | ------ |
| DEFAULT | 0 | 默认 | | DEFAULT | 0 | 默认 |
| EAST | 1 | 向东箭头 | | EAST | 1 | 向东箭头 |
| WEST | 2 | 向西箭头| | WEST | 2 | 向西箭头 |
| SOUTH | 3 | 向南箭头 | | SOUTH | 3 | 向南箭头 |
| NORTH | 4 | 向北箭头 | | NORTH | 4 | 向北箭头 |
| WEST_EAST | 5 | 向西东箭头 | | WEST_EAST | 5 | 向西东箭头 |
......
...@@ -299,7 +299,7 @@ sensor.unsubscribeStepCounter(); ...@@ -299,7 +299,7 @@ sensor.unsubscribeStepCounter();
## sensor.subscribeBarometer ## sensor.subscribeBarometer
subcribeBarometer(Object): void subscribeBarometer(Object): void
订阅气压传感器数据变化。针对同一个应用,多次点击调用时,会覆盖前面的调用效果,即仅最后一次调用生效。 订阅气压传感器数据变化。针对同一个应用,多次点击调用时,会覆盖前面的调用效果,即仅最后一次调用生效。
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
| enterkeytype | string | default | 否 | 不支持动态修改。<br/>设置软键盘Enter按钮的类型,可选值为:<br/>-&nbsp;default:默认<br/>-&nbsp;next:下一项<br/>-&nbsp;go:前往<br/>-&nbsp;done:完成<br/>-&nbsp;send:发送<br/>-&nbsp;search:搜索<br/>除“next”外,点击后会自动收起软键盘。 | | enterkeytype | string | default | 否 | 不支持动态修改。<br/>设置软键盘Enter按钮的类型,可选值为:<br/>-&nbsp;default:默认<br/>-&nbsp;next:下一项<br/>-&nbsp;go:前往<br/>-&nbsp;done:完成<br/>-&nbsp;send:发送<br/>-&nbsp;search:搜索<br/>除“next”外,点击后会自动收起软键盘。 |
| headericon | string | - | 否 | 在文本输入前的图标资源路径,该图标不支持点击事件(button,checkbox和radio不生效),图标格式为jpg,png和svg。 | | headericon | string | - | 否 | 在文本输入前的图标资源路径,该图标不支持点击事件(button,checkbox和radio不生效),图标格式为jpg,png和svg。 |
| showcounter<sup>5+</sup> | boolean | false | 否 | 文本输入框是否显示计数下标,需要配合maxlength一起使用。 | | showcounter<sup>5+</sup> | boolean | false | 否 | 文本输入框是否显示计数下标,需要配合maxlength一起使用。 |
| menuoptions<sup>5+</sup> | Array&lt;MeunOption&gt; | - | 否 | 设置文本选择弹框点击更多按钮之后显示的菜单项。 | | menuoptions<sup>5+</sup> | Array&lt;MenuOption&gt; | - | 否 | 设置文本选择弹框点击更多按钮之后显示的菜单项。 |
| autofocus<sup>6+</sup> | boolean | false | 否 | 是否自动获焦。<br/>应用首页中设置不生效,可在onActive中延迟(100-500ms左右)调用focus方法实现输入框在首页中自动获焦。 | | autofocus<sup>6+</sup> | boolean | false | 否 | 是否自动获焦。<br/>应用首页中设置不生效,可在onActive中延迟(100-500ms左右)调用focus方法实现输入框在首页中自动获焦。 |
| selectedstart<sup>6+</sup> | number | -1 | 否 | 开始选择文本时初始选择位置。 | | selectedstart<sup>6+</sup> | number | -1 | 否 | 开始选择文本时初始选择位置。 |
| selectedend<sup>6+</sup> | number | -1 | 否 | 开始选择文本时结尾选择位置。 | | selectedend<sup>6+</sup> | number | -1 | 否 | 开始选择文本时结尾选择位置。 |
......
...@@ -1428,7 +1428,7 @@ transform方法对应一个变换矩阵,想对一个图形进行变化的时 ...@@ -1428,7 +1428,7 @@ transform方法对应一个变换矩阵,想对一个图形进行变化的时
setTransform(scaleX: number, skewX: number, skewY: number, scale: number, translateX: number, translateY: number): void setTransform(scaleX: number, skewX: number, skewY: number, scale: number, translateX: number, translateY: number): void
setTransfrom方法使用的参数和transform()方法相同,但setTransform()方法会重置现有的变换矩阵并创建新的变换矩阵。 setTransform方法使用的参数和transform()方法相同,但setTransform()方法会重置现有的变换矩阵并创建新的变换矩阵。
**参数:** **参数:**
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
除支持[通用属性](../arkui-js/js-components-common-attributes.md)外,还支持如下属性: 除支持[通用属性](../arkui-js/js-components-common-attributes.md)外,还支持如下属性:
| 名称 | 类型 | 默认值 | 必填 | 描述 | | 名称 | 类型 | 默认值 | 必填 | 描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | ------- | ----- | ---- | ---------------------------------------- |
| muted | boolean | false | 否 | 视频是否静音播放。 | | muted | boolean | false | 否 | 视频是否静音播放。 |
| src | string | - | 否 | 播放视频内容的路径。 | | src | string | - | 否 | 播放视频内容的路径。 |
| autoplay | boolean | false | 否 | 视频是否自动播放。 | | autoplay | boolean | false | 否 | 视频是否自动播放。 |
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
除支持[通用样式](../arkui-js/js-components-common-styles.md)外,还支持如下样式: 除支持[通用样式](../arkui-js/js-components-common-styles.md)外,还支持如下样式:
| 名称 | 类型 | 默认值 | 必填 | 描述 | | 名称 | 类型 | 默认值 | 必填 | 描述 |
| -------- | -------- | -------- | -------- | -------- | | ---------- | ------ | ------- | ---- | ---------------------------------------- |
| object-fit | string | contain | 否 | 视频源的缩放类型,如果poster设置了值,那么此配置还会影响视频海报的缩放类型,可选值参考表 object-fit 类型说明。 | | object-fit | string | contain | 否 | 视频源的缩放类型,如果poster设置了值,那么此配置还会影响视频海报的缩放类型,可选值参考表 object-fit 类型说明。 |
**表1** object-fit 类型说明 **表1** object-fit 类型说明
| 类型 | 描述 | | 类型 | 描述 |
| -------- | -------- | | ---- | ------------------------- |
| fill | 不保持宽高比进行放大缩小,使得图片填充满显示边界。 | | fill | 不保持宽高比进行放大缩小,使得图片填充满显示边界。 |
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
除支持[通用事件](../arkui-js/js-components-common-events.md)外,还支持如下事件: 除支持[通用事件](../arkui-js/js-components-common-events.md)外,还支持如下事件:
| 名称 | 参数 | 描述 | | 名称 | 参数 | 描述 |
| -------- | -------- | -------- | | ---------- | ---------------------------------------- | ------------------------------------- |
| prepared | {&nbsp;duration:&nbsp;value&nbsp;}<sup>5+</sup> | 视频准备完成时触发该事件,通过duration可以获取视频时长,单位为s。 | | prepared | {&nbsp;duration:&nbsp;value&nbsp;}<sup>5+</sup> | 视频准备完成时触发该事件,通过duration可以获取视频时长,单位为s。 |
| start | - | 播放时触发该事件。 | | start | - | 播放时触发该事件。 |
| pause | - | 暂停时触发该事件。 | | pause | - | 暂停时触发该事件。 |
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
除支持[通用方法](../arkui-js/js-components-common-methods.md)外,还支持如下方法: 除支持[通用方法](../arkui-js/js-components-common-methods.md)外,还支持如下方法:
| 名称 | 参数 | 描述 | | 名称 | 参数 | 描述 |
| -------- | -------- | -------- | | -------------- | ------------------------------------- | ----------------- |
| start | - | 请求播放视频。 | | start | - | 请求播放视频。 |
| pause | - | 请求暂停播放视频。 | | pause | - | 请求暂停播放视频。 |
| setCurrentTime | {&nbsp;currenttime:&nbsp;value&nbsp;} | 指定视频播放的进度位置,单位为s。 | | setCurrentTime | {&nbsp;currenttime:&nbsp;value&nbsp;} | 指定视频播放的进度位置,单位为s。 |
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<div class="container"> <div class="container">
<video id='videoId' src='/common/myDeram.mp4' muted='false' autoplay='false' <video id='videoId' src='/common/myDeram.mp4' muted='false' autoplay='false'
controls='true' onprepared='preparedCallback' onstart='startCallback' controls='true' onprepared='preparedCallback' onstart='startCallback'
onpaues='pauesCallback' onfinish='finishCallback' onerror='errorCallback' onpause='pauseCallback' onfinish='finishCallback' onerror='errorCallback'
onseeking='seekingCallback' onseeked='seekedCallback' onseeking='seekingCallback' onseeked='seekedCallback'
ontimeupdate='timeupdateCallback' ontimeupdate='timeupdateCallback'
style="object-fit:fill; width:80%; height:400px;" style="object-fit:fill; width:80%; height:400px;"
......
...@@ -1831,7 +1831,7 @@ transform方法对应一个变换矩阵,想对一个图形进行变化的时 ...@@ -1831,7 +1831,7 @@ transform方法对应一个变换矩阵,想对一个图形进行变化的时
setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void
setTransfrom方法使用的参数和transform()方法相同,但setTransform()方法会重置现有的变换矩阵并创建新的变换矩阵。 setTransform方法使用的参数和transform()方法相同,但setTransform()方法会重置现有的变换矩阵并创建新的变换矩阵。
**参数:** **参数:**
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
### 文件 ### 文件
| 文件名称 | 描述 | | 文件名称 | 描述 |
| -------- | -------- | | ---------------------------------------- | ------------------ |
| [raw_dir.h](raw__dir_8h.md) | 提供rawfile目录相关功能。 | | [raw_dir.h](raw__dir_8h.md) | 提供rawfile目录相关功能。 |
| [raw_file.h](raw__file_8h.md) | 提供rawfile文件相关功能。 | | [raw_file.h](raw__file_8h.md) | 提供rawfile文件相关功能。 |
| [raw_file_manager.h](raw__file__manager_8h.md) | 提供资源管理rawfile相关功能。 | | [raw_file_manager.h](raw__file__manager_8h.md) | 提供资源管理rawfile相关功能。 |
...@@ -27,15 +27,15 @@ ...@@ -27,15 +27,15 @@
### 结构体 ### 结构体
| 结构体名称 | 描述 | | 结构体名称 | 描述 |
| -------- | -------- | | ---------------------------------------- | ----------------- |
| [RawFileDescriptor](_raw_file_descriptor.md) | 提供rawfile文件描述符信息。 | | [RawFileDescriptor](_raw_file_descriptor.md) | 提供rawfile文件描述符信息。 |
### 类型定义 ### 类型定义
| 类型定义名称 | 描述 | | 类型定义名称 | 描述 |
| -------- | -------- | | ---------------------------------------- | ------------------- |
| [RawDir](#rawdir) | 提供对rawfile目录的访问。 | | [RawDir](#rawdir) | 提供对rawfile目录的访问。 |
| [RawFile](#rawfile) | 提供对rawfile的访问功能。 | | [RawFile](#rawfile) | 提供对rawfile的访问功能。 |
| [NativeResourceManager](#nativeresourcemanager) | 代表resource manager。 | | [NativeResourceManager](#nativeresourcemanager) | 代表resource manager。 |
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
### 函数 ### 函数
| 函数名称 | 描述 | | 函数名称 | 描述 |
| -------- | -------- | | ---------------------------------------- | ---------------------------------------- |
| [OH_ResourceManager_GetRawFileName](#oh_resourcemanager_getrawfilename) ([RawDir](#rawdir) \*rawDir, int index) | 通过索引获取rawfile文件名称。 | | [OH_ResourceManager_GetRawFileName](#oh_resourcemanager_getrawfilename) ([RawDir](#rawdir) \*rawDir, int index) | 通过索引获取rawfile文件名称。 |
| [OH_ResourceManager_GetRawFileCount](#oh_resourcemanager_getrawfilecount) ([RawDir](#rawdir) \*rawDir) | 获取[RawDir](#rawdir)中的rawfile数量。 | | [OH_ResourceManager_GetRawFileCount](#oh_resourcemanager_getrawfilecount) ([RawDir](#rawdir) \*rawDir) | 获取[RawDir](#rawdir)中的rawfile数量。 |
| [OH_ResourceManager_CloseRawDir](#oh_resourcemanager_closerawdir) ([RawDir](#rawdir) \*rawDir) | 关闭已打开的[RawDir](#rawdir)并释放所有相关联资源。 | | [OH_ResourceManager_CloseRawDir](#oh_resourcemanager_closerawdir) ([RawDir](#rawdir) \*rawDir) | 关闭已打开的[RawDir](#rawdir)并释放所有相关联资源。 |
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
| [OH_ResourceManager_GetRawFileOffset](#oh_resourcemanager_getrawfileoffset) (const [RawFile](#rawfile) \*rawFile) | 获取rawfile当前的offset,单位为int32_t。 | | [OH_ResourceManager_GetRawFileOffset](#oh_resourcemanager_getrawfileoffset) (const [RawFile](#rawfile) \*rawFile) | 获取rawfile当前的offset,单位为int32_t。 |
| [OH_ResourceManager_GetRawFileDescriptor](#oh_resourcemanager_getrawfiledescriptor) (const [RawFile](#rawfile) \*rawFile, [RawFileDescriptor](_raw_file_descriptor.md) &amp;descriptor) | 基于offset(单位为int32_t)和文件长度打开rawfile,并获取rawfile文件描述符。 | | [OH_ResourceManager_GetRawFileDescriptor](#oh_resourcemanager_getrawfiledescriptor) (const [RawFile](#rawfile) \*rawFile, [RawFileDescriptor](_raw_file_descriptor.md) &amp;descriptor) | 基于offset(单位为int32_t)和文件长度打开rawfile,并获取rawfile文件描述符。 |
| [OH_ResourceManager_ReleaseRawFileDescriptor](#oh_resourcemanager_releaserawfiledescriptor) (const [RawFileDescriptor](_raw_file_descriptor.md) &amp;descriptor) | 关闭rawfile文件描述符。 | | [OH_ResourceManager_ReleaseRawFileDescriptor](#oh_resourcemanager_releaserawfiledescriptor) (const [RawFileDescriptor](_raw_file_descriptor.md) &amp;descriptor) | 关闭rawfile文件描述符。 |
| [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager) (napi_env env, napi_value jsResMgr) | 基于JavaScipt resource manager获取native resource manager。 | | [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager) (napi_env env, napi_value jsResMgr) | 基于JavaScript resource manager获取native resource manager。 |
| [OH_ResourceManager_ReleaseNativeResourceManager](#oh_resourcemanager_releasenativeresourcemanager) ([NativeResourceManager](#nativeresourcemanager) \*resMgr) | 释放native resource manager。 | | [OH_ResourceManager_ReleaseNativeResourceManager](#oh_resourcemanager_releasenativeresourcemanager) ([NativeResourceManager](#nativeresourcemanager) \*resMgr) | 释放native resource manager。 |
| [OH_ResourceManager_OpenRawDir](#oh_resourcemanager_openrawdir) (const [NativeResourceManager](#nativeresourcemanager) \*mgr, const char \*dirName) | 打开rawfile目录。 | | [OH_ResourceManager_OpenRawDir](#oh_resourcemanager_openrawdir) (const [NativeResourceManager](#nativeresourcemanager) \*mgr, const char \*dirName) | 打开rawfile目录。 |
| [OH_ResourceManager_OpenRawFile](#oh_resourcemanager_openrawfile) (const [NativeResourceManager](#nativeresourcemanager) \*mgr, const char \*fileName) | 打开rawfile文件。 | | [OH_ResourceManager_OpenRawFile](#oh_resourcemanager_openrawfile) (const [NativeResourceManager](#nativeresourcemanager) \*mgr, const char \*fileName) | 打开rawfile文件。 |
...@@ -133,8 +133,8 @@ void OH_ResourceManager_CloseRawDir (RawDir * rawDir) ...@@ -133,8 +133,8 @@ void OH_ResourceManager_CloseRawDir (RawDir * rawDir)
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------ | ------------------------- |
| rawDir | 表示指向[RawDir](#rawdir)的指针。 | | rawDir | 表示指向[RawDir](#rawdir)的指针。 |
**参见:** **参见:**
...@@ -159,8 +159,8 @@ void OH_ResourceManager_CloseRawFile (RawFile * rawFile) ...@@ -159,8 +159,8 @@ void OH_ResourceManager_CloseRawFile (RawFile * rawFile)
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------- | --------------------------- |
| rawFile | 表示指向[RawFile](#rawfile)的指针。 | | rawFile | 表示指向[RawFile](#rawfile)的指针。 |
**参见:** **参见:**
...@@ -187,8 +187,8 @@ int OH_ResourceManager_GetRawFileCount (RawDir * rawDir) ...@@ -187,8 +187,8 @@ int OH_ResourceManager_GetRawFileCount (RawDir * rawDir)
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------ | ------------------------- |
| rawDir | 表示指向[RawDir](#rawdir)的指针。 | | rawDir | 表示指向[RawDir](#rawdir)的指针。 |
**参见:** **参见:**
...@@ -215,8 +215,8 @@ bool OH_ResourceManager_GetRawFileDescriptor (const RawFile * rawFile, RawFileDe ...@@ -215,8 +215,8 @@ bool OH_ResourceManager_GetRawFileDescriptor (const RawFile * rawFile, RawFileDe
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ---------- | -------------------------------- |
| rawFile | 表示指向[RawFile](#rawfile)的指针。 | | rawFile | 表示指向[RawFile](#rawfile)的指针。 |
| descriptor | 显示rawfile文件描述符,以及在HAP包中的起始位置和长度。 | | descriptor | 显示rawfile文件描述符,以及在HAP包中的起始位置和长度。 |
...@@ -244,8 +244,8 @@ const char* OH_ResourceManager_GetRawFileName (RawDir * rawDir, int index ) ...@@ -244,8 +244,8 @@ const char* OH_ResourceManager_GetRawFileName (RawDir * rawDir, int index )
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------ | ----------------------------- |
| rawDir | 表示指向[RawDir](#rawdir)的指针。 | | rawDir | 表示指向[RawDir](#rawdir)的指针。 |
| index | 表示文件在[RawDir](#rawdir)中的索引位置。 | | index | 表示文件在[RawDir](#rawdir)中的索引位置。 |
...@@ -277,8 +277,8 @@ rawfile当前的offset。 ...@@ -277,8 +277,8 @@ rawfile当前的offset。
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------- | --------------------------- |
| rawFile | 表示指向[RawFile](#rawfile)的指针。 | | rawFile | 表示指向[RawFile](#rawfile)的指针。 |
**返回:** **返回:**
...@@ -303,8 +303,8 @@ long OH_ResourceManager_GetRawFileSize (RawFile * rawFile) ...@@ -303,8 +303,8 @@ long OH_ResourceManager_GetRawFileSize (RawFile * rawFile)
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------- | --------------------------- |
| rawFile | 表示指向[RawFile](#rawfile)的指针。 | | rawFile | 表示指向[RawFile](#rawfile)的指针。 |
**返回:** **返回:**
...@@ -325,16 +325,16 @@ NativeResourceManager* OH_ResourceManager_InitNativeResourceManager (napi_env en ...@@ -325,16 +325,16 @@ NativeResourceManager* OH_ResourceManager_InitNativeResourceManager (napi_env en
**描述:** **描述:**
基于JavaScipt resource manager获取native resource manager。 基于JavaScript resource manager获取native resource manager。
通过获取resource manager来完成rawfile相关功能。 通过获取resource manager来完成rawfile相关功能。
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | -------- | ---------------------------------------- |
| env | 表示JavaScipt Native Interface (napi)环境指针。 | | env | 表示JavaScript Native Interface (napi)环境指针。 |
| jsResMgr | 表示JavaScipt resource manager。 | | jsResMgr | 表示JavaScript resource manager。 |
**返回:** **返回:**
...@@ -360,8 +360,8 @@ RawDir* OH_ResourceManager_OpenRawDir (const NativeResourceManager * mgr, const ...@@ -360,8 +360,8 @@ RawDir* OH_ResourceManager_OpenRawDir (const NativeResourceManager * mgr, const
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------- | ---------------------------------------- |
| mgr | 表示指向[NativeResourceManager](#nativeresourcemanager)的指针,此指针是通过调用 [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager)方法获取的。 | | mgr | 表示指向[NativeResourceManager](#nativeresourcemanager)的指针,此指针是通过调用 [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager)方法获取的。 |
| dirName | 表示要打开的rawfile目录名称,当传递一个空字符串时表示打开rawfile根目录。 | | dirName | 表示要打开的rawfile目录名称,当传递一个空字符串时表示打开rawfile根目录。 |
...@@ -395,8 +395,8 @@ RawFile* OH_ResourceManager_OpenRawFile (const NativeResourceManager * mgr, cons ...@@ -395,8 +395,8 @@ RawFile* OH_ResourceManager_OpenRawFile (const NativeResourceManager * mgr, cons
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | -------- | ---------------------------------------- |
| mgr | 表示指向[NativeResourceManager](#nativeresourcemanager)的指针,此指针是通过调用 [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager)方法获取的。 | | mgr | 表示指向[NativeResourceManager](#nativeresourcemanager)的指针,此指针是通过调用 [OH_ResourceManager_InitNativeResourceManager](#oh_resourcemanager_initnativeresourcemanager)方法获取的。 |
| fileName | 表示基于rawfile根目录的相对路径下的文件名称。 | | fileName | 表示基于rawfile根目录的相对路径下的文件名称。 |
...@@ -430,8 +430,8 @@ int OH_ResourceManager_ReadRawFile (const RawFile * rawFile, void * buf, size_t ...@@ -430,8 +430,8 @@ int OH_ResourceManager_ReadRawFile (const RawFile * rawFile, void * buf, size_t
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------- | --------------------------- |
| rawFile | 表示指向[RawFile](#rawfile)的指针。 | | rawFile | 表示指向[RawFile](#rawfile)的指针。 |
| buf | 用于接收读取数据的缓冲区指针。 | | buf | 用于接收读取数据的缓冲区指针。 |
| length | 读取数据的字节长度。 | | length | 读取数据的字节长度。 |
...@@ -458,8 +458,8 @@ void OH_ResourceManager_ReleaseNativeResourceManager (NativeResourceManager * re ...@@ -458,8 +458,8 @@ void OH_ResourceManager_ReleaseNativeResourceManager (NativeResourceManager * re
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------ | ---------------------------------------- |
| resMgr | 表示[NativeResourceManager](#nativeresourcemanager)指针。 | | resMgr | 表示[NativeResourceManager](#nativeresourcemanager)指针。 |
**自从:** **自从:**
...@@ -482,8 +482,8 @@ bool OH_ResourceManager_ReleaseRawFileDescriptor (const RawFileDescriptor & desc ...@@ -482,8 +482,8 @@ bool OH_ResourceManager_ReleaseRawFileDescriptor (const RawFileDescriptor & desc
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ---------- | -------------------------------- |
| descriptor | 包含rawfile文件描述符,以及在HAP包中的起始位置和长度。 | | descriptor | 包含rawfile文件描述符,以及在HAP包中的起始位置和长度。 |
**返回:** **返回:**
...@@ -508,8 +508,8 @@ int OH_ResourceManager_SeekRawFile (const RawFile * rawFile, long offset, int wh ...@@ -508,8 +508,8 @@ int OH_ResourceManager_SeekRawFile (const RawFile * rawFile, long offset, int wh
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ------- | ---------------------------------------- |
| rawFile | 表示指向[RawFile](#rawfile)的指针。 | | rawFile | 表示指向[RawFile](#rawfile)的指针。 |
| offset | 表示指定的offset。 | | offset | 表示指定的offset。 |
| whence | 读写位置,有以下场景:<br/>**0**: 读写位置为**offset**<br/>**1**: 读写位置为当前位置加上**offset**<br/>**2**: 读写位置为文件末尾(EOF)加上**offset**。 | | whence | 读写位置,有以下场景:<br/>**0**: 读写位置为**offset**<br/>**1**: 读写位置为当前位置加上**offset**<br/>**2**: 读写位置为文件末尾(EOF)加上**offset**。 |
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
### 栅格容器内子组件的栅格设置 ### 栅格容器内子组件的栅格设置
栅格容器中的组件使用通用属性useSizeType设置不同的设备宽度类型的占用列数和列偏移。其中span表示栅格容器组件占据columns的数量;offest表示列偏移量,指将组件放置在哪一个columns上。 如: 栅格容器中的组件使用通用属性useSizeType设置不同的设备宽度类型的占用列数和列偏移。其中span表示栅格容器组件占据columns的数量;offset表示列偏移量,指将组件放置在哪一个columns上。 如:
```ts ```ts
GridContainer() { GridContainer() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册