提交 9b63b896 编写于 作者: D dy 提交者: Gitee

Merge branch 'OpenHarmony-3.2-Release' of gitee.com:openharmony/docs into API9_changelog_3.2Releae

Signed-off-by: Ndy <dingyao5@huawei.com>
# @ohos.prompt
# @ohos.prompt (Prompt)
The **Prompt** module provides APIs for creating and showing toasts, dialog boxes, and action menus.
......@@ -45,9 +45,9 @@ Describes the options for showing the toast.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| message | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | Yes | Text to display. |
| Name | Type | Mandatory| Description |
| -------- | --------------- | ---- | ------------------------------------------------------------ |
| message | string | Yes | Text to display. |
| duration | number | No | Duration that the toast will remain on the screen. The default value is 1500 ms. The value range is 1500 ms to 10000 ms. If a value less than 1500 ms is set, the default value is used. If the value greater than 10000 ms is set, the upper limit 10000 ms is used.|
| bottom | string\| number | No | Distance between the toast border and the bottom of the screen. It does not have an upper limit. The default unit is vp. |
......@@ -147,9 +147,9 @@ Describes the options for showing the dialog box.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Mandatory| Description |
| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| title | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | No | Title of the dialog box. |
| message | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | No | Text body. |
| ------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| title | string | No | Title of the dialog box. |
| message | string | No | Text body. |
| buttons | [[Button](#button),[Button](#button)?,[Button](#button)?] | No | Array of buttons in the dialog box. The array structure is **{text:'button', color: '\#666666'}**. Up to three buttons are supported. The first button is of the **positiveButton** type, the second is of the **negativeButton** type, and the third is of the **neutralButton** type.|
## ShowDialogSuccessResponse
......@@ -257,7 +257,7 @@ Describes the options for showing the action menu.
| Name | Type | Mandatory| Description |
| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| title | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | No | Title of the text to display. |
| title | string | No | Title of the text to display. |
| buttons | [[Button](#button),[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?,[Button](#button)?] | Yes | Array of menu item buttons. The array structure is **{text:'button', color: '\#666666'}**. Up to six buttons are supported. If there are more than six buttons, extra buttons will not be displayed.|
## ActionMenuSuccessResponse
......@@ -276,7 +276,7 @@ Describes the menu item button in the action menu.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Mandatory | Description |
| ----- | ---------------------------------------- | ---- | ------- |
| text | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | Yes | Button text.|
| color | string\| [Resource](../arkui-ts/ts-types.md#resource)<sup>9+</sup> | Yes | Text color of the button.|
| Name | Type | Mandatory| Description |
| ----- | ------ | ---- | -------------- |
| text | string | Yes | Button text.|
| color | string | Yes | Text color of the button.|
......@@ -362,7 +362,7 @@ For details about the error codes, see [Router Error Codes](../errorcodes/errorc
| ID | Error Message|
| --------- | ------- |
| 100001 | if UI execution context not found, only throw in standard system. |
| 100001 | if can not get the delegate, only throw in standard system. |
| 200002 | if the uri is not exist. |
**Example**
......@@ -597,7 +597,7 @@ export default {
// detail page
export default {
onInit() {
console.info('showData1:' + router.getParams()[data1]);
console.info('showData1:' + router.getParams()['data1']);
}
}
```
......
......@@ -3,7 +3,7 @@
Custom components are existing components encapsulated based on service requirements. A custom component can be invoked multiple times in a project to improve the code readability. You can import a custom component to the host page through **element** as shown in the following code snippet:
```html
<element name='comp' src='../../common/component/comp.hml'></element>
<element name='comp' src='../common/component/comp.hml'></element>
<div>
<comp prop1='xxxx' @child1="bindParentVmMethod"></comp>
</div>
......@@ -12,8 +12,8 @@ Custom components are existing components encapsulated based on service requirem
The following is an example of using a custom component with **if-else**, which displays **comp1** when **showComp1** is set to **true** and displays **comp2** otherwise.
```html
<element name='comp1' src='../../common/component/comp1/comp1.hml'></element>
<element name='comp2' src='../../common/component/comp2/comp2.hml'></element>
<element name='comp1' src='../common/component/comp1/comp1.hml'></element>
<element name='comp2' src='../common/component/comp2/comp2.hml'></element>
<div>
<comp1 if="{{showComp1}}" prop1='xxxx' @child1="bindParentVmMethodOne"></comp1>
<comp2 else prop1='xxxx' @child1="bindParentVmMethodTwo"></comp2>
......@@ -76,7 +76,7 @@ The following example describes how to import **comp** to the parent component:
```html
<!-- xxx.hml -->
<element name='comp' src='../../common/component/comp.hml'></element>
<element name='comp' src='../common/component/comp.hml'></element>
<div class="container">
<comp @event-type1="textClicked"></comp>
</div>
......@@ -125,7 +125,7 @@ In the following example, the child component passes the **text** parameter to t
```html
<!-- xxx.hml -->
<element name='comp' src='../../common/comp/comp.hml'></element>
<element name='comp' src='../common/comp/comp.hml'></element>
<div class="container">
<text>Parent component: {{text}}</text>
<comp @event-type1="textClicked"></comp>
......
......@@ -21,7 +21,7 @@ export default {
```html
<!-- xxx.hml -->
<element name='comp' src='../../common/component/comp/comp.hml'></element>
<element name='comp' src='../common/component/comp/comp.hml'></element>
<div class="container">
<comp comp-prop="{{title}}"></comp>
</div>
......@@ -57,7 +57,7 @@ In this example, a **\<text>** component is added to display the title. The titl
```html
<!-- xxx.hml -->
<element name='comp' src='../../common/component/comp/comp.hml'></element>
<element name='comp' src='../common/component/comp/comp.hml'></element>
<div class="container">
<comp title="Custom component"></comp>
</div>
......
......@@ -20,7 +20,7 @@ You can use the **\<slot>** tag to create a slot inside a custom component to fi
The following references the custom component:
```html
<!-- xxx.hml -->
<element name='comp' src='../../common/component/comp.hml'></element>
<element name='comp' src='../common/component/comp.hml'></element>
<div class="container">
<comp>
<text class="text-style">Content defined in the parent component</text>
......@@ -45,7 +45,7 @@ When multiple slots are need inside a custom component, you can name them, so th
The following references the custom component:
```html
<!-- xxx.hml -->
<element name='comp' src='../../common/component/comp.hml'></element>
<element name='comp' src='../common/component/comp.hml'></element>
<div class="container">
<comp>
<text class="text-style" slot="second">Fill in the second slot.</text>
......
......@@ -63,7 +63,7 @@ Creates a **FormComponent** instance to display the provided widget.
## Attributes
| Name | Type | Mandatory| Description |
| ----------- | ----------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------- |
| size | {<br>width?:&nbsp;[Length](ts-types.md#length),<br>height?:&nbsp;[Length](ts-types.md#length)<br>} | Yes | Size of the widget. |
| size | {<br>width?: [Length](ts-types.md#length),<br>height?: [Length](ts-types.md#length)<br>} | Yes | Size of the widget. |
| moduleName | string | Yes | Module name of the widget. |
| dimension | [FormDimension](#formdimension) | No | Dimensions of the widget. The widgets in the 2 x 2, 4 x 4, and 4 x 2 dimensions are supported.<br>Default value: **Dimension_2_2**|
| allowUpdate | boolean | No | Whether to allow the widget to update.<br>Default value: **true** |
......@@ -75,10 +75,10 @@ Creates a **FormComponent** instance to display the provided widget.
| Name | Description |
| ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| onAcquired(callback:&nbsp;(info:&nbsp;{&nbsp;id:&nbsp;number&nbsp;})&nbsp;=&gt;&nbsp;void) | Triggered when a widget is obtained. This API returns the ID of the obtained widget. |
| onError(callback:&nbsp;(info:&nbsp;{&nbsp;errcode:&nbsp;number,&nbsp;msg:&nbsp;string&nbsp;})&nbsp;=&gt;&nbsp;void) | Triggered when an error occurs during component loading.<br>**errcode**: error code.<br>**msg**: error information. |
| onRouter(callback:&nbsp;(info:&nbsp;any)&nbsp;=&gt;&nbsp;void) | Triggered when routing occurs for the widget. This API returns information in [routerEvent](../js-service-widget-ui/js-service-widget-syntax-hml.md#event-binding).|
| onUninstall(callback:&nbsp;(info:&nbsp;{&nbsp;id:&nbsp;number&nbsp;})&nbsp;=&gt;&nbsp;void) | Triggered when a widget is uninstalled. This API returns the ID of the uninstalled widget. |
| onAcquired(callback: (info: { id: number }) =&gt; void) | Triggered when a widget is obtained. This API returns the ID of the obtained widget. |
| onError(callback: (info: { errcode: number, msg: string }) =&gt; void) | Triggered when an error occurs during component loading.<br>**errcode**: error code.<br>**msg**: error information. |
| onRouter(callback: (info: any) =&gt; void) | Triggered when routing occurs for the widget. This API returns information in [routerEvent](../js-service-widget-ui/js-service-widget-syntax-hml.md#event-binding).|
| onUninstall(callback: (info: { id: number }) =&gt; void) | Triggered when a widget is uninstalled. This API returns the ID of the uninstalled widget. |
## Example
......@@ -108,7 +108,7 @@ struct CardExample {
.visibility(Visibility.Visible)
.onAcquired((form)=>{
console.log(`form info : ${JSON.stringify(form)}`);
this.fomId = form.id;
this.formId = form.id;
})
.onError((err)=>{
console.log(`fail to add form, err: ${JSON.stringify(err)}`);
......
......@@ -16,6 +16,8 @@ Not supported
QRCode(value: string)
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
......@@ -28,8 +30,8 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the
| Name| Type| Description|
| -------- | -------- | -------- |
| color | [ResourceColor](ts-types.md#resourcecolor) | Color of the QR code.<br>Default value: **Color.Black**|
| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | Background color of the QR code.<br>Default value: **Color.White**|
| color | [ResourceColor](ts-types.md#resourcecolor) | Color of the QR code.<br>Default value: **Color.Black**<br>Since API version 9, this API is supported in ArkTS widgets.|
| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | Background color of the QR code.<br>Default value: **Color.White**<br>Since API version 9, this API is supported in ArkTS widgets.|
## Events
......@@ -45,17 +47,21 @@ Among all the universal events, only the [click event](ts-universal-events-click
@Component
struct QRCodeExample {
private value: string = 'hello world'
build() {
Column({ space: 5 }) {
Text('normal').fontSize(9).width('90%').fontColor(0xCCCCCC)
Text('normal').fontSize(9).width('90%').fontColor(0xCCCCCC).fontSize(30)
QRCode(this.value).width(200).height(200)
Text('color').fontSize(9).width('90%').fontColor(0xCCCCCC)
// Set the color for the QR code.
Text('color').fontSize(9).width('90%').fontColor(0xCCCCCC).fontSize(30)
QRCode(this.value).color(0xF7CE00).width(200).height(200)
// Set the background color for the QR code.
Text('backgroundColor').fontSize(9).width('90%').fontColor(0xCCCCCC).fontSize(30)
QRCode(this.value).width(200).height(200).backgroundColor(Color.Orange)
}.width('100%').margin({ top: 5 })
}
}
```
![en-us_image_0000001256858415](figures/en-us_image_0000001256858415.png)
![qrcode](figures/qrcode.png)
......@@ -16,6 +16,8 @@ Not supported
Radio(options: {value: string, group: string})
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
......@@ -29,7 +31,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the
| Name| Type| Description|
| -------- | -------- | -------- |
| checked | boolean | Whether the radio button is selected.<br>Default value: **false**|
| checked | boolean | Whether the radio button is selected.<br>Default value: **false**<br>Since API version 9, this API is supported in ArkTS widgets.|
## Events
......@@ -37,7 +39,7 @@ In addition to the [universal events](ts-universal-events-click.md), the followi
| Name| Description|
| -------- | -------- |
| onChange(callback: (isChecked: boolean) => void) | Triggered when the selected state of the radio button changes.<br> - If **isChecked** is **true**, the radio button is selected.<br> - If **isChecked** is **false**, the radio button is not selected.|
| onChange(callback: (isChecked: boolean) => void) | Triggered when the selected state of the radio button changes.<br> - If **isChecked** is **true**, the radio button is selected.<br> - If **isChecked** is **false**, the radio button is not selected.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Example
......
......@@ -16,6 +16,8 @@ Not supported
Rating(options?: { rating: number, indicator?: boolean })
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
......@@ -28,16 +30,16 @@ Rating(options?: { rating: number, indicator?: boolean })
| Name| Type| Description|
| -------- | -------- | -------- |
| stars | number | Total number of stars.<br>Default value: **5**|
| stepSize | number | Step of an operation.<br>Default value: **0.5**|
| starStyle | {<br>backgroundUri: string,<br>foregroundUri: string,<br>secondaryUri?: string<br>} | **backgroundUri**: image link of the unselected star. You can use the default image or a custom local image.<br>**foregroundUri**: image path of the selected star. You can use the default image or a custom local image.<br>**secondaryUir**: image path of the partially selected star. You can use the default image or a custom local image.|
| stars | number | Total number of stars.<br>Default value: **5**<br>Since API version 9, this API is supported in ArkTS widgets.|
| stepSize | number | Step of an operation.<br>Default value: **0.5**<br>Since API version 9, this API is supported in ArkTS widgets.|
| starStyle | {<br>backgroundUri: string,<br>foregroundUri: string,<br>secondaryUri?: string<br>} | **backgroundUri**: image link of the unselected star. You can use the default image or a custom local image.<br>**foregroundUri**: image path of the selected star. You can use the default image or a custom local image.<br>**secondaryUir**: image path of the partially selected star. You can use the default image or a custom local image.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Events
| Name| Description|
| -------- | -------- |
| onChange(callback:(value: number) =&gt; void) | Triggered when the rating value changes.|
| onChange(callback:(value: number) =&gt; void) | Triggered when the rating value changes.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Example
......
......@@ -16,6 +16,8 @@ Not supported
Slider(options?: {value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Axis, reverse?: boolean})
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
......@@ -24,12 +26,14 @@ Slider(options?: {value?: number, min?: number, max?: number, step?: number, sty
| min | number | No| Minimum value.<br>Default value: **0**|
| max | number | No| Maximum value.<br>Default value: **100**|
| step | number | No| Step of the slider.<br>Default value: **1**<br>Value range: [0.01, max]|
| style | SliderStyle | No| Style of the slider thumb and track.<br>Default value: **SliderStyle.OutSet**|
| style | [SliderStyle](#sliderstyle) | No| Style of the slider thumb and track.<br>Default value: **SliderStyle.OutSet**|
| direction<sup>8+</sup> | [Axis](ts-appendix-enums.md#axis) | No| Whether the slider moves horizontally or vertically.<br>Default value: **Axis.Horizontal**|
| reverse<sup>8+</sup> | boolean | No| Whether the slider values are reversed. By default, the values increase from left to right for a horizontal slider and from top to bottom for a vertical slider.<br>Default value: **false**|
## SliderStyle
Since API version 9, this API is supported in ArkTS widgets.
| Name| Description|
| -------- | -------- |
| OutSet | The slider is on the slider track.|
......@@ -42,12 +46,12 @@ Except touch target attributes, the universal attributes are supported.
| Name| Type| Description|
| -------- | -------- | -------- |
| blockColor | [ResourceColor](ts-types.md#resourcecolor) | Color of the slider.|
| trackColor | [ResourceColor](ts-types.md#resourcecolor) | Background color of the slider.|
| selectedColor | [ResourceColor](ts-types.md#resourcecolor) | Color of the selected part of the slider track.|
| showSteps | boolean | Whether to display the current step.<br>Default value: **false**|
| showTips | boolean | Whether to display a bubble to indicate the percentage when the user drags the slider.<br>Default value: **false**|
| trackThickness | [Length](ts-types.md#length) | Track thickness of the slider.|
| blockColor | [ResourceColor](ts-types.md#resourcecolor) | Color of the slider.<br>Since API version 9, this API is supported in ArkTS widgets.|
| trackColor | [ResourceColor](ts-types.md#resourcecolor) | Background color of the slider.<br>Since API version 9, this API is supported in ArkTS widgets.|
| selectedColor | [ResourceColor](ts-types.md#resourcecolor) | Color of the selected part of the slider track.<br>Since API version 9, this API is supported in ArkTS widgets.|
| showSteps | boolean | Whether to display the current step.<br>Default value: **false**<br>Since API version 9, this API is supported in ArkTS widgets.|
| showTips | boolean | Whether to display a bubble to indicate the percentage when the user drags the slider.<br>Default value: **false**<br>Since API version 9, this API is supported in ArkTS widgets.|
| trackThickness | [Length](ts-types.md#length) | Track thickness of the slider.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Events
......@@ -56,10 +60,12 @@ In addition to the **OnAppear** and **OnDisAppear** universal events, the follow
| Name| Description|
| -------- | -------- |
| onChange(callback: (value: number, mode: SliderChangeMode) =&gt; void) | Invoked when the slider slides.<br>**value**: current slider value. If the return value contains decimals, you can use **Math.toFixed()** to process the data to the desired precision.<br>**mode**: dragging state.|
| onChange(callback: (value: number, mode: SliderChangeMode) =&gt; void) | Invoked when the slider slides.<br>**value**: current slider value. If the return value contains decimals, you can use **Math.toFixed()** to process the data to the desired precision.<br>**mode**: dragging state.<br>Since API version 9, this API is supported in ArkTS widgets.|
## SliderChangeMode
Since API version 9, this API is supported in ArkTS widgets.
| Name| Value| Description|
| -------- | -------- | -------- |
| Begin | 0 | The user starts to drag the slider.|
......
......@@ -16,6 +16,8 @@ Not supported
Span(value: string | Resource)
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
......@@ -23,21 +25,20 @@ Span(value: string | Resource)
| value | string \| [Resource](ts-types.md#resource) | Yes| Plain text.|
## Attributes
In addition to the [universal text style](ts-universal-attributes-text-style.md) attributes, the following attributes are supported.
| Name| Type| Description|
| -------- | -------- | -------- |
| decoration | {<br>type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),<br>color?: [ResourceColor](ts-types.md#resourcecolor)<br>} | Style and color of the text decorative line.<br>Default value: {<br>type: TextDecorationType.None<br>color: Color.Black<br>} |
| letterSpacing | number \| string | Letter spacing. |
| textCase | [TextCase](ts-appendix-enums.md#textcase) | Text case.<br>Default value: **TextCase.Normal**|
| decoration | {<br>type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),<br>color?: [ResourceColor](ts-types.md#resourcecolor)<br>} | Style and color of the text decorative line.<br>Default value: {<br>type: TextDecorationType.None<br>color: Color.Black<br>} <br>Since API version 9, this API is supported in ArkTS widgets.|
| letterSpacing | number \| string | Letter spacing. A negative value tightens the spacing; a positive value loosens the spacing, and the letters are spread farther apart with the value.<br>Since API version 9, this API is supported in ArkTS widgets. |
| textCase | [TextCase](ts-appendix-enums.md#textcase) | Text case.<br>Default value: **TextCase.Normal**<br>Since API version 9, this API is supported in ArkTS widgets.|
## Events
Among all the [universal events](ts-universal-attributes-click.md), only the click event is supported.
Among all the universal events, only the [click event](ts-universal-attributes-click.md) is supported.
> **NOTE**
>
......@@ -59,29 +60,59 @@ struct SpanExample {
.decoration({ type: TextDecorationType.None, color: Color.Red })
}
// Add a line under the text.
Text('Text Decoration').fontSize(9).fontColor(0xCCCCCC)
Text() {
Span('I am Underline-span').decoration({ type: TextDecorationType.Underline, color: Color.Red }).fontSize(12)
}
Text() {
Span('I am LineThrough-span').decoration({ type: TextDecorationType.LineThrough, color: Color.Red }).fontSize(12)
Span('I am LineThrough-span')
.decoration({ type: TextDecorationType.LineThrough, color: Color.Red })
.fontSize(12)
}
Text() {
Span('I am Overline-span').decoration({ type: TextDecorationType.Overline, color: Color.Red }).fontSize(12)
}
// Set the letter spacing.
Text('LetterSpacing').fontSize(9).fontColor(0xCCCCCC)
Text() {
Span('span letter spacing')
.letterSpacing(0)
.fontSize(12)
}
Text() {
Span('span letter spacing')
.letterSpacing(-2)
.fontSize(12)
}
Text() {
Span('span letter spacing')
.letterSpacing(3)
.fontSize(12)
}
// Set the text case.
Text('Text Case').fontSize(9).fontColor(0xCCCCCC)
Text() {
Span('I am Lower-span').textCase(TextCase.LowerCase).fontSize(12)
.decoration({ type: TextDecorationType.None, color: Color.Red })
Span('I am Lower-span').fontSize(12)
.textCase(TextCase.LowerCase)
.decoration({ type: TextDecorationType.None })
}
Text() {
Span('I am Upper-span').textCase(TextCase.UpperCase).fontSize(12)
.decoration({ type: TextDecorationType.None, color: Color.Red })
Span('I am Upper-span').fontSize(12)
.textCase(TextCase.UpperCase)
.decoration({ type: TextDecorationType.None })
}
}.width('100%').height(250).padding({ left: 35, right: 35, top: 35 })
}
}
```
![en-us_image_0000001257138363](figures/en-us_image_0000001257138363.gif)
![span](figures/span.png)
......@@ -16,6 +16,8 @@ This component can contain the [\<Span>](ts-basic-components-span.md) child comp
Text(content?: string | Resource)
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
......@@ -28,17 +30,17 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the
| Name | Type | Description |
| ----------------------- | ----------------------------------- | ------------------------------------------- |
| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Horizontal alignment mode of the text.<br>Default value: **TextAlign.Start**<br>**NOTE**<br>The text takes up the full width of the **\<Text>** component. To set the vertical alignment for the text, use the [align](ts-universal-attributes-location.md) attribute.|
| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | Display mode when the text is too long.<br>Default value: **{overflow: TextOverflow.Clip}**<br>**NOTE**<br/>Text is clipped at the transition between words. To clip text in the middle of a word, add **\u200B** between characters.<br>This attribute must be used with `maxLines` to take effect. |
| maxLines | number | Maximum number of lines in the text.<br>Default value: **Infinity**<br>**NOTE**<br/>By default, text is automatically folded. If this attribute is specified, the text will not exceed the specified number of lines. If there is extra text, you can use **textOverflow** to specify how it is displayed. |
| lineHeight | string \| number \| [Resource](ts-types.md#resource) | Text line height. If the value is less than or equal to **0**, the line height is not limited and the font size is adaptive. If the value of the number type, the unit fp is used.|
| decoration | {<br>type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),<br>color?: [ResourceColor](ts-types.md#resourcecolor)<br>} | Style and color of the text decorative line.<br>Default value: {<br>type: TextDecorationType.None,<br>color: Color.Black<br>} |
| baselineOffset | number \| string | Baseline offset of the text. The default value is **0**. |
| letterSpacing | number \| string | Letter spacing. |
| minFontSize | number \| string \| [Resource](ts-types.md#resource) | Minimum font size.<br>For the setting to take effect, this attribute must be used together with **maxFontSize**, **maxline**, or a layout size constraint. |
| maxFontSize | number \| string \| [Resource](ts-types.md#resource) | Maximum font size.<br>For the setting to take effect, this attribute must be used together with **minFontSize**, **maxline**, or a layout size constraint. |
| textCase | [TextCase](ts-appendix-enums.md#textcase) | Text case.<br>Default value: **TextCase.Normal**|
| copyOption<sup>9+</sup> | [CopyOptions](ts-appendix-enums.md#copyoptions9) | Whether copy and paste is allowed.<br>Default value: **CopyOptions.None**|
| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Horizontal alignment mode of the text.<br>Default value: **TextAlign.Start**<br>**NOTE**<br>The text takes up the full width of the **\<Text>** component. To set the vertical alignment for the text, use the [align](ts-universal-attributes-location.md) attribute.<br>Since API version 9, this API is supported in ArkTS widgets.|
| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | Display mode when the text is too long.<br>Default value: **{overflow: TextOverflow.Clip}**<br>**NOTE**<br/>Text is clipped at the transition between words. To clip text in the middle of a word, add **\u200B** between characters.<br>This attribute must be used with `maxLines` to take effect.<br>Since API version 9, this API is supported in ArkTS widgets.|
| maxLines | number | Maximum number of lines in the text.<br>Default value: **Infinity**<br>**NOTE**<br/>By default, text is automatically folded. If this attribute is specified, the text will not exceed the specified number of lines. If there is extra text, you can use **textOverflow** to specify how it is displayed.<br>Since API version 9, this API is supported in ArkTS widgets.|
| lineHeight | string \| number \| [Resource](ts-types.md#resource) | Text line height. If the value is less than or equal to **0**, the line height is not limited and the font size is adaptive. If the value of the number type, the unit fp is used.<br>Since API version 9, this API is supported in ArkTS widgets.|
| decoration | {<br>type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),<br>color?: [ResourceColor](ts-types.md#resourcecolor)<br>} | Style and color of the text decorative line.<br>Default value: {<br>type: TextDecorationType.None,<br>color: Color.Black<br>} <br>Since API version 9, this API is supported in ArkTS widgets.|
| baselineOffset | number \| string | Baseline offset of the text. The default value is **0**.<br>Since API version 9, this API is supported in ArkTS widgets. |
| letterSpacing | number \| string | Letter spacing.<br>Since API version 9, this API is supported in ArkTS widgets. |
| minFontSize | number \| string \| [Resource](ts-types.md#resource) | Minimum font size.<br>For the setting to take effect, this attribute must be used together with **maxFontSize**, **maxline**, or a layout size constraint.<br>Since API version 9, this API is supported in ArkTS widgets. |
| maxFontSize | number \| string \| [Resource](ts-types.md#resource) | Maximum font size.<br>For the setting to take effect, this attribute must be used together with **minFontSize**, **maxline**, or a layout size constraint.<br>Since API version 9, this API is supported in ArkTS widgets. |
| textCase | [TextCase](ts-appendix-enums.md#textcase) | Text case.<br>Default value: **TextCase.Normal**<br>Since API version 9, this API is supported in ArkTS widgets.|
| copyOption<sup>9+</sup> | [CopyOptions](ts-appendix-enums.md#copyoptions9) | Whether copy and paste is allowed.<br>Default value: **CopyOptions.None**<br>This API is supported in ArkTS widgets.|
> **NOTE**
>
......
......@@ -6,6 +6,10 @@ The **\<Toggle>** component provides a clickable element in the check box, butto
>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
This component can contain child components only when **ToggleType** is set to **Button**.
......@@ -15,6 +19,8 @@ This component can contain child components only when **ToggleType** is set to *
Toggle(options: { type: ToggleType, isOn?: boolean })
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory | Description |
......@@ -24,26 +30,29 @@ Toggle(options: { type: ToggleType, isOn?: boolean })
## ToggleType
Since API version 9, this API is supported in ArkTS widgets.
| Name | Description |
| -------- | ---------------- |
| Checkbox | Check box type.<br>> **NOTE**<br>> The default value of the universal attribute [padding](ts-universal-attributes-size.md) is as follows:<br>{<br> top: 14 vp,<br> right: 6 vp,<br> bottom: 14 vp,<br> left: 6 vp<br> } |
| Checkbox | Check box type.<br>**NOTE**<br>The default value of the universal attribute [padding](ts-universal-attributes-size.md) is as follows:<br>{<br> top: 14 vp,<br> right: 6 vp,<br> bottom: 14 vp,<br> left: 6 vp<br> } |
| Button | Button type. The set string, if any, will be displayed inside the button. |
| Switch | Switch type.<br>> **NOTE**<br>> The default value of the universal attribute [padding](ts-universal-attributes-size.md) is as follows:<br>{<br> top: 12 vp,<br> right: 12 vp,<br> bottom: 12 vp,<br> left: 12 vp<br> } |
| Switch | Switch type.<br>**NOTE**<br>The default value of the universal attribute [padding](ts-universal-attributes-size.md) is as follows:<br>{<br> top: 12 vp,<br> right: 12 vp,<br> bottom: 12 vp,<br> left: 12 vp<br> } |
## Attributes
| Name | Parameter | Description |
| ---------------- | --------------------------- | ---------------------- |
| selectedColor | [ResourceColor](ts-types.md#resourcecolor) | Background color of the component when it is turned on.|
| switchPointColor | [ResourceColor](ts-types.md#resourcecolor) | Color of the circular slider when the component is of the **Switch** type.<br>> **NOTE**<br>> This attribute is valid only when **type** is set to **ToggleType.Switch**.|
| selectedColor | [ResourceColor](ts-types.md#resourcecolor) | Background color of the component when it is turned on.<br>Since API version 9, this API is supported in ArkTS widgets.|
| switchPointColor | [ResourceColor](ts-types.md#resourcecolor) | Color of the circular slider when the component is of the **Switch** type.<br>**NOTE**<br>This attribute is valid only when **type** is set to **ToggleType.Switch**.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Events
| Name| Description|
| -------- | -------- |
| onChange(callback: (isOn: boolean) =&gt; void) | Triggered when the toggle status changes.|
| onChange(callback: (isOn: boolean) =&gt; void) | Triggered when the toggle status changes.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Example
......
......@@ -31,6 +31,8 @@ Multiple child components are supported.
RelativeContainer()
Since API version 9, this API is supported in ArkTS widgets.
## Example
```ts
......
......@@ -16,19 +16,21 @@ Supported
Row(value?:{space?: number | string })
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| space | string \| number | No| Horizontal spacing between two adjacent child components.<br>Since API version 9, this parameter does not take effect when it is set to a negative number.<br>Default value: **0**, in vp|
| space | string \| number | No| Horizontal spacing between two adjacent child components.<br>Since API version 9, this parameter does not take effect when it is set to a negative number.<br>Default value: **0**, in vp |
## Attributes
| Name| Type| Description|
| -------- | -------- | -------- |
| alignItems | [VerticalAlign](ts-appendix-enums.md#verticalalign) | Alignment mode of child components in the vertical direction.<br>Default value: **VerticalAlign.Center**|
| justifyContent<sup>8+</sup> | [FlexAlign](ts-appendix-enums.md#flexalign) | Alignment mode of the child components in the horizontal direction.<br>FlexAlign.Start |
| alignItems | [VerticalAlign](ts-appendix-enums.md#verticalalign) | Alignment mode of child components in the vertical direction.<br>Default value: **VerticalAlign.Center**<br>Since API version 9, this API is supported in ArkTS widgets.|
| justifyContent<sup>8+</sup> | [FlexAlign](ts-appendix-enums.md#flexalign) | Alignment mode of the child components in the horizontal direction.<br>FlexAlign.Start <br>Since API version 9, this API is supported in ArkTS widgets.|
## Example
......
......@@ -16,11 +16,13 @@ Supported
Stack(value?: { alignContent?: Alignment })
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| alignContent | [Alignment](ts-appendix-enums.md#alignment) | No| Alignment of child components in the container.<br>Default value: **Alignment.Center**|
| Name | Type | Mandatory| Description |
| ------------ | ------------------------------------------- | ---- | ----------------------------------------------------------- |
| alignContent | [Alignment](ts-appendix-enums.md#alignment) | No | Alignment of child components in the container.<br>Default value: **Alignment.Center**|
## Example
......
......@@ -21,6 +21,8 @@ The following child components are supported: **[\<Rect>](ts-drawing-components-
Shape(value?: PixelMap)
Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
| Name| Type| Mandatory| Default Value| Description|
......@@ -34,19 +36,19 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| viewPort | {<br>x?: number \| string,<br>y?: number \| string,<br>width?: number \| string,<br>height?: number \| string<br>} | { x:0, y:0, width:0, height:0 } | View port of the shape.|
| fill | [ResourceColor](ts-types.md) | Color.Black | Color of the fill area.|
| fillOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | Opacity of the fill area.|
| stroke | [ResourceColor](ts-types.md) | - | Stroke color. If this attribute is not set, the component does not have any stroke.|
| strokeDashArray | Array&lt;Length&gt; | [] | Stroke dashes.|
| strokeDashOffset | number \| string | 0 | Offset of the start point for drawing the stroke.|
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | Cap style of the stroke.|
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | Join style of the stroke.|
| strokeMiterLimit | number \| string | 4 | Limit on the ratio of the miter length to the value of **strokeWidth** used to draw a miter join. The miter length indicates the distance from the outer tip to the inner corner of the miter.<br>**NOTE**<br>This attribute must be set to a value greater than or equal to 1 and takes effect when **strokeLineJoin** is set to **LineJoinStyle.Miter**.|
| strokeOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | Stroke opacity.<br>**NOTE**<br>The value range is [0.0, 1.0]. If the set value is less than 0.0, **0.0** will be used. If the set value is greater than 1.0, **1.0** will be used.|
| strokeWidth | number \| string | 1 | Stroke width.|
| antiAlias | boolean | true | Whether anti-aliasing is enabled.|
| mesh<sup>8+</sup> | Array&lt;number&gt;,number,number | [],0,0 | Mesh effect. The first parameter is an array of lengths (column + 1) * (row + 1) * 2, which records the position of each vertex of the distorted bitmap. The second parameter is the number of columns in the mesh matrix. The third parameter is the number of rows in the mesh matrix.|
| viewPort | {<br>x?: number \| string,<br>y?: number \| string,<br>width?: number \| string,<br>height?: number \| string<br>} | { x:0, y:0, width:0, height:0 } | View port of the shape.<br>Since API version 9, this API is supported in ArkTS widgets.|
| fill | [ResourceColor](ts-types.md) | Color.Black | Color of the fill area.<br>Since API version 9, this API is supported in ArkTS widgets.|
| fillOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | Opacity of the fill area.<br>Since API version 9, this API is supported in ArkTS widgets.|
| stroke | [ResourceColor](ts-types.md) | - | Stroke color. If this attribute is not set, the component does not have any stroke.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeDashArray | Array&lt;Length&gt; | [] | Stroke dashes.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeDashOffset | number \| string | 0 | Offset of the start point for drawing the stroke.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | Cap style of the stroke.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | Join style of the stroke.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeMiterLimit | number \| string | 4 | Limit on the ratio of the miter length to the value of **strokeWidth** used to draw a miter join. The miter length indicates the distance from the outer tip to the inner corner of the miter.<br>**NOTE**<br>This attribute must be set to a value greater than or equal to 1 and takes effect when **strokeLineJoin** is set to **LineJoinStyle.Miter**.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | Stroke opacity.<br>**NOTE**<br>The value range is [0.0, 1.0]. If the set value is less than 0.0, **0.0** will be used. If the set value is greater than 1.0, **1.0** will be used.<br>Since API version 9, this API is supported in ArkTS widgets.|
| strokeWidth | number \| string | 1 | Stroke width.<br>Since API version 9, this API is supported in ArkTS widgets.|
| antiAlias | boolean | true | Whether anti-aliasing is enabled.<br>Since API version 9, this API is supported in ArkTS widgets.|
| mesh<sup>8+</sup> | Array&lt;number&gt;,number,number | [],0,0 | Mesh effect. The first parameter is an array of lengths (column + 1) * (row + 1) * 2, which records the position of each vertex of the distorted bitmap. The second parameter is the number of columns in the mesh matrix. The third parameter is the number of rows in the mesh matrix.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Example
......
......@@ -158,9 +158,9 @@ OpenHarmony IDL容器数据类型与Ts数据类型、C++数据类型的对应关
> **注意**:请保证使用最新版的SDK,版本老旧可能导致部分语句报错。
若不存在,可对应版本前往[docs仓版本目录](https://gitee.com/openharmony/docs/tree/master/zh-cn/release-notes)下载SDK包,以[3.2Beta3版本](../../release-notes/OpenHarmony-v3.2-beta3.md#%E4%BB%8E%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9%E8%8E%B7%E5%8F%96)为例,可通过镜像站点获取。
若不存在,可对应版本前往[docs仓版本目录](https://gitee.com/openharmony/docs/tree/master/zh-cn/release-notes)下载SDK包,以[3.2Beta5版本](../../release-notes/OpenHarmony-v3.2-beta5.md#从镜像站点获取)为例,可通过镜像站点获取。
关于如何替换DevEco Studio的SDK包具体操作,参考[full-SDK替换指南](../quick-start/full-sdk-switch-guide.md#full-sdk%E6%9B%BF%E6%8D%A2%E6%8C%87%E5%8D%97)中的替换方法。
关于如何替换DevEco Studio的SDK包具体操作,参考[full-SDK替换指南](../quick-start/full-sdk-switch-guide.md)中的替换方法。
得到idl工具的可执行文件后,根据具体场景进行后续开发步骤。
......
......@@ -12,4 +12,4 @@
| 进程间通信 | 本章节介绍了FA模型的进程模型以及几种常用的进程间通信方式。 | [公共事件](common-event-fa.md)<br/>[后台服务](rpc.md) |
| 线程间通信 | 本章节介绍了FA模型的线程模型以及几种常用的线程间通信方式。 | [线程间通信](itc-fa-overview.md) |
| 任务管理 | 本章节介绍了FA模型中任务管理的基本概念和典型场景。 | [任务管理](mission-management-fa.md) |
| 应用配置文件 | 本章节介绍FA模型中应用配置文件的开发要求。 | [FA模型应用配置文件](config-file-fa.md) |
| 应用配置文件 | 本章节介绍FA模型中应用配置文件的开发要求。 | [FA模型应用配置文件](../quick-start/application-configuration-file-overview-fa.md) |
......@@ -40,4 +40,4 @@
| 进程间通信 | 本章节介绍了Stage模型的进程模型以及几种常用的进程间通信方式。 | -&nbsp;[公共事件](common-event-overview.md)<br/>-&nbsp;[后台服务](background-services.md) |
| 线程间通信 | 本章节介绍了Stage模型的线程模型以及几种常用的线程间通信方式。 | -&nbsp;[Emitter](itc-with-emitter.md)<br/>-&nbsp;[Worker](itc-with-worker.md) |
| 任务管理 | 本章节介绍了Stage模型中任务管理的基本概念和典型场景。 | -&nbsp;[任务管理场景介绍](mission-management-overview.md)<br/>-&nbsp;[任务管理与启动模式](mission-management-launch-type.md)<br/>-&nbsp;[页面栈和任务链](page-mission-stack.md) |
| 应用配置文件 | 本章节介绍Stage模型中应用配置文件的开发要求。 | [Stage模型应用配置文件](config-file-stage.md) |
| 应用配置文件 | 本章节介绍Stage模型中应用配置文件的开发要求。 | [Stage模型应用配置文件](../quick-start/application-configuration-file-overview-stage.md) |
......@@ -5,6 +5,7 @@
- [HTTP数据请求](http-request.md)
- [WebSocket连接](websocket-connection.md)
- [Socket连接](socket-connection.md)
- [网络共享](net-sharing.md)
- IPC与RPC通信
- [IPC与RPC通信概述](ipc-rpc-overview.md)
- [IPC与RPC通信开发指导](ipc-rpc-development-guideline.md)
......
文件模式从 100755 更改为 100644
......@@ -33,7 +33,7 @@
故障管理是应用提升用户体验的重要手段。应用程序框架为开发者提供了故障监听、故障恢复、以及故障查询三种方式来管理应用的故障。
- 故障监听指的是通过[errorManager](../reference/apis/js-apis-application-errorManager.md)注册[ErrorObserver](../reference/apis/js-apis-application-errorManager.md#errorobserver),监听故障的发生,并通知到监听方。
- 故障监听指的是通过[errorManager](../reference/apis/js-apis-app-ability-errorManager.md)注册[ErrorObserver](../reference/apis/js-apis-inner-application-errorObserver.md),监听故障的发生,并通知到监听方。
- 故障恢复指的是[appRecovery](../reference/apis/js-apis-app-ability-appRecovery.md),及故障发生后,将应用重启恢复到故障之前的状态。
......@@ -41,8 +41,8 @@
下图中并没有标记[faultLogger](../reference/apis/js-apis-faultLogger.md)的调用时机,开发者可以根据应用启动时传入的[LastExitReason](../reference/apis/js-apis-application-abilityConstant.md#abilityconstantlastexitreason)来决定是否调用[faultLogger](../reference/apis/js-apis-faultLogger.md)查询上次的故障信息。
![故障处理流程示意](./figures/20221106203527.png)
这里建议应用开发者使用[errorManager](../reference/apis/js-apis-application-errorManager.md)对应用的异常进行处理,处理完成后开发者可以选择调用状态保存接口并主动重启应用。
如果开发者没有注册[ErrorObserver](../reference/apis/js-apis-application-errorManager.md#errorobserver)也没有使能自动恢复,则按照系统的默认逻辑执行进程退出。用户可以选择从启动器再次打开应用。
这里建议应用开发者使用[errorManager](../reference/apis/js-apis-app-ability-errorManager.md)对应用的异常进行处理,处理完成后开发者可以选择调用状态保存接口并主动重启应用。
如果开发者没有注册[ErrorObserver](../reference/apis/js-apis-inner-application-errorObserver.md)也没有使能自动恢复,则按照系统的默认逻辑执行进程退出。用户可以选择从启动器再次打开应用。
如果开发者使能了自动恢复,框架会首先检查当前故障是否支持状态保存以及开发者是否配置了状态保存,如果支持则会回调[Ability](../reference/apis/js-apis-application-ability.md#ability)[onSaveState](../reference/apis/js-apis-application-ability.md#abilityonsavestate)的接口。最后重启应用。
### 应用故障管理接口支持场景
......@@ -94,7 +94,7 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant'
#### 主动触发保存和恢复
- 定义和注册[ErrorObserver](../reference/apis/js-apis-application-errorManager.md#errorobserver) callback
- 定义和注册[ErrorObserver](../reference/apis/js-apis-inner-application-errorObserver.md) callback
```ts
var registerId = -1;
......
......@@ -111,7 +111,7 @@
let dateTimeFormat = new Intl.DateTimeFormat();
```
另一种方法是使用开发者提供的Locale和格式化参数来创建日期时间格式化对象。其中,格式化参数是可选的,完整的格式化参数列表见[DateTimeOptions](../reference/apis/js-apis-intl.md#datetimeoptions)。
另一种方法是使用开发者提供的Locale和格式化参数来创建日期时间格式化对象。其中,格式化参数是可选的,完整的格式化参数列表见[DateTimeOptions](../reference/apis/js-apis-intl.md#datetimeoptions9)。
```js
let options = {dateStyle: "full", timeStyle: "full"};
......@@ -181,7 +181,7 @@
let numberFormat = new Intl.NumberFormat();
```
另一种方法是使用开发者提供的Locale和格式化参数来创建数字格式化对象。其中,格式化参数是可选的,完整的格式化参数列表参见[NumberOptions](../reference/apis/js-apis-intl.md#numberoptions)。
另一种方法是使用开发者提供的Locale和格式化参数来创建数字格式化对象。其中,格式化参数是可选的,完整的格式化参数列表参见[NumberOptions](../reference/apis/js-apis-intl.md#NumberOptions9)。
```js
let options = {compactDisplay: "short", notation: "compact"};
......@@ -240,7 +240,7 @@
let collator = new Intl.Collator();
```
另一种方法是使用开发者提供的Locale和其他相关参数来创建Collator对象,完整的参数列表参见[CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions8)。
另一种方法是使用开发者提供的Locale和其他相关参数来创建Collator对象,完整的参数列表参见[CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions9)。
其中,sensitivity参数用于控制哪些级别的差异会被用于比较两个字符串。取值"base"表示,仅比较字符本身,不考虑重音符号、大小写差异。例如,'a' != 'b','a' == 'á','a' == 'A'。取值"accent"表示考虑重音符号,不考虑大小写的差异。例如,'a' != 'b','a' != 'á','a' == 'A'。取值"case"表示考虑大小写的差异,不考虑重音符号的差异。例如,'a' != 'b','a' == 'á','a' != 'A'。取值"variant"表示考虑重音符号、大小写等方面差异。例如'a' != 'b','a' != 'á','a' != 'A'。
```js
......@@ -301,7 +301,7 @@
let pluralRules = new Intl.PluralRules();
```
另一种方法是使用开发者提供的Locale和其他相关参数来创建单复数对象。完整的参数列表参见[PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions8)。
另一种方法是使用开发者提供的Locale和其他相关参数来创建单复数对象。完整的参数列表参见[PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions9)。
```js
let pluralRules = new Intl.PluralRules("zh-CN", {localeMatcher: "best fit", type: "cardinal"});
......@@ -349,7 +349,7 @@
let relativeTimeFormat = new Intl.RelativeTimeFormat();
```
另一种方法是使用开发者提供的Locale和格式化参数来创建相对时间格式化对象。其中,格式化参数是可选的,完整的参数列表参见[ RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions8)。
另一种方法是使用开发者提供的Locale和格式化参数来创建相对时间格式化对象。其中,格式化参数是可选的,完整的参数列表参见[ RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions9)。
```js
let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"});
......
......@@ -6,18 +6,16 @@ WantAgent提供了封装行为意图的能力,这里所说的行为意图主
为通知添加行为意图的实现方式如下图所示:发布通知的应用向应用组件管理服务AMS(Ability Manager Service)申请WantAgent,然后随其他通知信息一起发送给桌面,当用户在桌面通知栏上点击通知时,触发WantAgent动作。
**图1** 携带行为意图的通知运行机制
![notification-with-wantagent](figures/notification-with-wantagent.png)
## 接口说明
具体接口描述,详见[WantAgent接口文档](../reference/apis/js-apis-wantAgent.md#wantagent%E6%A8%A1%E5%9D%97)
具体接口描述,详见[WantAgent接口文档](../reference/apis/js-apis-wantAgent.md)
| | |
| -------- | -------- |
| **接口名** | **描述** |
| -------- | -------- |
| getWantAgent(info:&nbsp;WantAgentInfo,&nbsp;callback:&nbsp;AsyncCallback&lt;WantAgent&gt;):&nbsp;void | 创建WantAgent。 |
| trigger(agent:&nbsp;WantAgent,&nbsp;triggerInfo:&nbsp;TriggerInfo,&nbsp;callback?:&nbsp;Callback&lt;CompleteData&gt;):&nbsp;void | 触发WantAgent意图。 |
| cancel(agent:&nbsp;WantAgent,&nbsp;callback:&nbsp;AsyncCallback&lt;void&gt;):&nbsp;void | 取消WantAgent。 |
......
......@@ -3,7 +3,7 @@
进度条通知也是常见的通知类型,主要应用于文件下载、事务处理进度显示。OpenHarmony提供了进度条模板,发布通知应用设置好进度条模板的属性值,如模板名、模板数据,通过通知子系统发送到通知栏显示。
目前系统模板仅支持进度条模板,通知模板[NotificationTemplate](../reference/apis/js-apis-notificationManager.md#notificationtemplate)中的data参数为用户自定义数据,用于显示与模块相关的数据,效果示意如下图所示。
目前系统模板仅支持进度条模板,通知模板[NotificationTemplate](../reference/apis/js-apis-inner-notification-notificationTemplate.md)中的data参数为用户自定义数据,用于显示与模块相关的数据,效果示意如下图所示。
![zh-cn_image_0000001416903138](figures/zh-cn_image_0000001416903138.png)
......
......@@ -18,13 +18,6 @@
- [@ohos.app.form.FormExtensionAbility (FormExtensionAbility)](js-apis-app-form-formExtensionAbility.md)
- [@ohos.application.DataShareExtensionAbility (数据共享扩展能力)](js-apis-application-dataShareExtensionAbility.md)
- [@ohos.application.StaticSubscriberExtensionAbility (StaticSubscriberExtensionAbility)](js-apis-application-staticSubscriberExtensionAbility.md)
- Stage模型能力的接口(待停用)
- [@ohos.application.AbilityConstant (AbilityConstant)](js-apis-application-abilityConstant.md)
- [@ohos.application.AbilityStage (AbilityStage)](js-apis-application-abilityStage.md)
- [@ohos.application.EnvironmentCallback (EnvironmentCallback)](js-apis-application-environmentCallback.md)
- [@ohos.application.FormExtension (FormExtension)](js-apis-application-formExtension.md)
- [@ohos.application.ServiceExtensionAbility (ServiceExtensionAbility)](js-apis-application-serviceExtensionAbility.md)
- [@ohos.application.StartOptions (StartOptions)](js-apis-application-startOptions.md)
- FA模型能力的接口
- [@ohos.ability.ability (Ability)](js-apis-ability-ability.md)
- [@ohos.ability.featureAbility (FeatureAbility模块)](js-apis-ability-featureAbility.md)
......@@ -36,6 +29,8 @@
- [@ohos.app.ability.appRecovery (appRecovery)](js-apis-app-ability-appRecovery.md)
- [@ohos.app.ability.Configuration (Configuration)](js-apis-app-ability-configuration.md)
- [@ohos.app.ability.ConfigurationConstant (ConfigurationConstant)](js-apis-app-ability-configurationConstant.md)
- [@ohos.app.ability.dataUriUtils (DataUriUtils模块)](js-apis-app-ability-dataUriUtils.md)
- [@ohos.app.ability.dialogRequest (dialogRequest模块)](js-apis-app-ability-dialogRequest.md)
- [@ohos.app.ability.errorManager (ErrorManager)](js-apis-app-ability-errorManager.md)
- [@ohos.app.ability.missionManager (missionManager)](js-apis-app-ability-missionManager.md)
- [@ohos.app.ability.quickFixManager (quickFixManager)](js-apis-app-ability-quickFixManager.md)
......@@ -241,12 +236,12 @@
- [@ohos.file.fileExtensionInfo (公共文件访问与管理属性信息)](js-apis-fileExtensionInfo.md)
- [@ohos.file.fs (文件管理)](js-apis-file-fs.md)
- [@ohos.file.hash (文件哈希处理)](js-apis-file-hash.md)
- [@ohos.file.picker (选择器)](js-apis-file-picker.md)
- [@ohos.file.securityLabel (数据标签)](js-apis-file-securityLabel.md)
- [@ohos.file.statvfs (文件系统空间统计)](js-apis-file-statvfs.md)
- [@ohos.file.storageStatistics (应用空间统计)](js-apis-file-storage-statistics.md)
- [@ohos.file.volumeManager (卷管理)](js-apis-file-volumemanager.md)
- [@ohos.filemanagement.userFileManager (用户数据管理)](js-apis-userFileManager.md)
- [@ohos.multimedia.medialibrary (媒体库管理)](js-apis-medialibrary.md)
- 电话服务
- [@ohos.contact (联系人)](js-apis-contact.md)
......@@ -261,13 +256,14 @@
- [@ohos.net.connection (网络连接管理)](js-apis-net-connection.md)
- [@ohos.net.ethernet (以太网连接管理)](js-apis-net-ethernet.md)
- [@ohos.net.http (数据请求)](js-apis-http.md)
- [@ohos.net.policy (网络策略管理)](js-apis-net-policy.md)
- [@ohos.net.sharing (网络共享管理)](js-apis-net-sharing.md)
- [@ohos.net.socket (Socket连接)](js-apis-socket.md)
- [@ohos.net.webSocket (WebSocket连接)](js-apis-webSocket.md)
- [@ohos.request (上传下载)](js-apis-request.md)
- 通信与连接
- [@ohos.bluetooth (蓝牙)](js-apis-bluetooth.md)
- [@ohos.bluetoothManager (蓝牙)](js-apis-bluetoothManager.md)
- [@ohos.connectedTag (有源标签)](js-apis-connectedTag.md)
- [@ohos.nfc.cardEmulation (标准NFC-cardEmulation)](js-apis-cardEmulation.md)
- [@ohos.nfc.controller (标准NFC)](js-apis-nfcController.md)
......@@ -383,6 +379,7 @@
- 已停止维护的接口
- [@ohos.backgroundTaskManager (后台任务管理)](js-apis-backgroundTaskManager.md)
- [@ohos.bluetooth (蓝牙)](js-apis-bluetooth.md)
- [@ohos.bundle (Bundle模块)](js-apis-Bundle.md)
- [@ohos.bundle.innerBundleManager (innerBundleManager模块)](js-apis-Bundle-InnerBundleManager.md)
- [@ohos.bundleState (设备使用信息统计)](js-apis-deviceUsageStatistics.md)
......@@ -411,6 +408,7 @@
- [@system.fetch (数据请求)](js-apis-system-fetch.md)
- [@system.file (文件存储)](js-apis-system-file.md)
- [@system.geolocation (地理位置)](js-apis-system-location.md)
- [@ohos.multimedia.medialibrary (媒体库管理)](js-apis-medialibrary.md)
- [@system.mediaquery (媒体查询)](js-apis-system-mediaquery.md)
- [@system.network (网络状态)](js-apis-system-network.md)
- [@system.notification (通知消息)](js-apis-system-notification.md)
......
......@@ -812,7 +812,7 @@ featureAbility.AbilityStartSetting.BOUNDS_KEY
| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | 表示迁移是否是可反向的。 |
| FLAG_INSTALL_ON_DEMAND | 0x00000800 | 表示如果未安装指定的Ability,将安装该Ability。 |
| FLAG_INSTALL_WITH_BACKGROUND_MODE | 0x80000000 | 表示如果未安装指定的Ability,将在后台安装该Ability。 |
| FLAG_ABILITY_CLEAR_MISSION | 0x00008000 | 表示清除其他任务的操作。可以为传递给 **[ohos.app.Context](js-apis-ability-context.md)****startAbility**方法的**Want**设置此标志,并且必须与**flag_ABILITY_NEW_MISSION**一起使用。 |
| FLAG_ABILITY_CLEAR_MISSION | 0x00008000 | 表示清除其他任务的操作。可以为传递给 **FeatureAbility**[startAbility](#featureabilitystartability)方法的参数对象[parameter](js-apis-inner-ability-startAbilityParameter.md)下的[Want](js-apis-application-want.md)设置此标志,并且必须与**flag_ABILITY_NEW_MISSION**一起使用。 |
| FLAG_ABILITY_NEW_MISSION | 0x10000000 | 表示在已有的任务栈上创建任务的操作。 |
| FLAG_ABILITY_MISSION_TOP | 0x20000000 | 表示如果启动的Ability的现有实例已位于任务栈顶,则将重用该实例。否则,将创建一个新的Ability实例。 |
......@@ -84,6 +84,6 @@ Flags说明。
| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | 表示迁移是可拉回的。<br>**系统API**: 此接口为系统接口,三方应用不支持调用。 |
| FLAG_INSTALL_ON_DEMAND | 0x00000800 | 如果未安装指定的功能,请安装该功能。 |
| FLAG_INSTALL_WITH_BACKGROUND_MODE | 0x80000000 | 如果未安装,使用后台模式安装该功能。 |
| FLAG_ABILITY_CLEAR_MISSION | 0x00008000 | 指示清除其他任务的操作。可以为传递给 **[ohos.app.Context](js-apis-ability-context.md)****startAbility**方法的**Want**设置此标志,并且必须与**flag_ABILITY_NEW_MISSION**一起使用。 |
| FLAG_ABILITY_CLEAR_MISSION | 0x00008000 | 指示清除其他任务的操作。可以为传递给 **FeatureAbility**[startAbility](js-apis-ability-featureAbility.md#startability)方法的**Want**设置此标志,并且必须与**flag_ABILITY_NEW_MISSION**一起使用。 |
| FLAG_ABILITY_NEW_MISSION | 0x10000000 | 指示在历史任务堆栈上创建任务的操作。 |
| FLAG_ABILITY_MISSION_TOP | 0x20000000 | 指示如果启动能力的现有实例已位于任务堆栈的顶部,则将重用该实例。否则,将创建一个新的能力实例。 |
\ No newline at end of file
......@@ -23,8 +23,8 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant';
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| launchReason | [LaunchReason](#abilityconstantlaunchreason)| 是 | 是 | 示启动原因。 |
| lastExitReason | [LastExitReason](#abilityconstantlastexitreason) | 是 | 是 | 表示最后退出原因。 |
| launchReason | [LaunchReason](#abilityconstantlaunchreason)| 是 | 是 | 枚举类型,表示启动原因。 |
| lastExitReason | [LastExitReason](#abilityconstantlastexitreason) | 是 | 是 | 枚举类型,表示最后退出原因。 |
## AbilityConstant.LaunchReason
......@@ -35,8 +35,8 @@ Ability初次启动原因,该类型为枚举,可配合[Ability](js-apis-app-
| 名称 | 值 | 说明 |
| ----------------------------- | ---- | ------------------------------------------------------------ |
| UNKNOWN | 0 | 未知原因。 |
| START_ABILITY | 1 | 通过[startAbility](js-apis-ability-context.md#abilitycontextstartability)接口启动ability。 |
| CALL | 2 | 通过[startAbilityByCall](js-apis-ability-context.md#abilitycontextstartabilitybycall)接口启动ability。 |
| START_ABILITY | 1 | 通过[startAbility](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)接口启动ability。 |
| CALL | 2 | 通过[startAbilityByCall](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartabilitybycall)接口启动ability。 |
| CONTINUATION | 3 | 跨端设备迁移启动ability。 |
| APP_RECOVERY | 4 | 设置应用恢复后,应用故障时自动恢复启动ability。 |
......@@ -124,8 +124,8 @@ class MyAbility extends UIAbility {
```ts
let want = {
bundleName: 'com.test.example',
abilityName: 'MainAbility'
bundleName: 'com.example.myapplication',
abilityName: 'EntryAbility'
};
let option = {
windowMode: AbilityConstant.WindowMode.WINDOW_MODE_FULLSCREEN
......@@ -135,7 +135,7 @@ let option = {
this.context.startAbility(want, option).then(()=>{
console.log('Succeed to start ability.');
}).catch((error)=>{
console.log('Failed to start ability with error: ' + JSON.stringify(error));
console.error('Failed to start ability with error: ${JSON.stringify(error)}');
});
```
......
......@@ -15,20 +15,20 @@ import common from '@ohos.app.ability.common';
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
| 名称 | 类型 | 必填 | 说明 |
| ----------- | -------------------- | ---- | ------------------------------------------------------------ |
| UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | 否 | UIAbilityContext二级模块。 |
| AbilityStageContext | [AbilityStageContext](js-apis-inner-application-abilityStageContext.md) | 否 | AbilityStageContext二级模块。 |
| ApplicationContext | [ApplicationContext](js-apis-inner-application-applicationContext.md) | 否 | ApplicationContext二级模块。 |
| BaseContext | [BaseContext](js-apis-inner-application-baseContext.md) | 否 | BaseContext二级模块。 |
| Context | [Context](js-apis-inner-application-context.md) | 否 | Context二级模块。 |
| ExtensionContext | [ExtensionContext](js-apis-inner-application-extensionContext.md) | 否 | ExtensionContext二级模块。 |
| FormExtensionContext | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | 否 | FormExtensionContext二级模块。 |
| EventHub | [EventHub](js-apis-inner-application-eventHub.md) | 否 | EventHub二级模块。 |
| PermissionRequestResult | [PermissionRequestResult](js-apis-inner-application-permissionRequestResult.md) | 否 | PermissionRequestResult二级模块。 |
| PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#PacMap) | 否 | PacMap二级模块。 |
| AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | 否 | AbilityResult二级模块。 |
| ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | 否 | ConnectOptions二级模块。 |
| 名称 | 类型 | 说明 |
| ----------- | -------------------- | ------------------------------------------------------------ |
| UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | UIAbilityContext二级模块。 |
| AbilityStageContext | [AbilityStageContext](js-apis-inner-application-abilityStageContext.md) | AbilityStageContext二级模块。 |
| ApplicationContext | [ApplicationContext](js-apis-inner-application-applicationContext.md) | ApplicationContext二级模块。 |
| BaseContext | [BaseContext](js-apis-inner-application-baseContext.md) | BaseContext二级模块。 |
| Context | [Context](js-apis-inner-application-context.md) | Context二级模块。 |
| ExtensionContext | [ExtensionContext](js-apis-inner-application-extensionContext.md) | ExtensionContext二级模块。 |
| FormExtensionContext | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | FormExtensionContext二级模块。 |
| ServiceExtensionContext | [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md) | ServiceExtensionContext二级模块。 |
| EventHub | [EventHub](js-apis-inner-application-eventHub.md) | EventHub二级模块。 |
| PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#PacMap) | PacMap二级模块。 |
| AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | AbilityResult二级模块。 |
| ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | ConnectOptions二级模块。 |
**示例:**
```ts
......@@ -42,19 +42,7 @@ let context: common.Context;
let extensionContext: common.ExtensionContext;
let formExtensionContext: common.FormExtensionContext;
let eventHub: common.EventHub;
let permissionRequestResult: common.PermissionRequestResult;
let pacMap: common.PacMap;
let abilityResult: common.AbilityResult;
let connectOptions: common.ConnectOptions;
```
## AreaMode
访问的文件分区,每个文件分区有对应自己的内容。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
| 名称 | 值 | 说明 |
| --------------- | ---- | --------------- |
| EL1 | 0 | 设备级加密区。 |
| EL2 | 1 | 用户凭据加密区。默认为EL2。 |
\ No newline at end of file
# @ohos.app.ability.contextConstant (ContextConstant)
ContextConstant模块提供数据加密等级定义的能力
ContextConstant提供Context相关的枚举,当前仅包含数据加密等级的枚举
> **说明:**
>
......@@ -21,5 +21,5 @@ import contextConstant from '@ohos.app.ability.contextConstant';
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
| EL1 | 0 | 设备级加密区。 |
| EL2 | 1 | 用户凭据加密区。 |
| EL1 | 0 | 设备级加密区,设备开机后可访问的数据区。 |
| EL2 | 1 | 用户级加密区,设备开机,首次输入密码后才能够访问的数据区。 |
# @ohos.app.ability.ExtensionAbility (扩展能力基类)
ExtensionAbility模块提供对ExtensionAbility生命周期、上下文环境等调用管理的能力,包括ExtensionAbility创建、销毁、转储客户端信息等
ExtensionAbility是特定场景扩展能力的基类,提供系统配置更新回调和系统内存调整回调。
> **说明:**
>
......@@ -28,3 +28,4 @@ import ExtensionAbility from '@ohos.app.ability.ExtensionAbility';
}
}
```
# @ohos.app.ability.ServiceExtensionAbility (ServiceExtensionAbility)
ServiceExtensionAbility模块提供ServiceExtension服务扩展相关接口的能力
ServiceExtensionAbility模块提供后台服务相关扩展能力,提供后台服务创建、销毁、连接、断开等生命周期回调
> **说明:**
>
......@@ -40,9 +40,9 @@ Extension生命周期回调,在创建时回调,执行初始化业务逻辑
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
**示例:**
......@@ -88,10 +88,10 @@ Extension生命周期回调,如果是startAbility或者startServiceExtensionAb
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
| startId | number | 是 | 返回拉起次数。首次拉起初始值返回1,多次之后自动递增。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
| startId | number | 是 | 返回拉起次数。首次拉起初始值返回1,多次之后自动递增。 |
**示例:**
......@@ -116,15 +116,15 @@ Extension生命周期回调,如果是connectAbility拉起的服务,会在onC
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md)| 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md)| 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| rpc.RemoteObject | 一个RemoteObject对象,用于和客户端进行通信。 |
| 类型 | 说明 |
| -------- | -------- |
| rpc.RemoteObject | 一个RemoteObject对象,用于和客户端进行通信。 |
**示例:**
......@@ -158,9 +158,9 @@ Extension的生命周期,断开服务连接时回调。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |[Want](js-apis-app-ability-want.md)| 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |[Want](js-apis-app-ability-want.md)| 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
**示例:**
......@@ -184,9 +184,9 @@ onReconnect(want: Want): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |[Want](js-apis-app-ability-want.md)| 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |[Want](js-apis-app-ability-want.md)| 是 | 当前Extension相关的Want类型信息,包括ability名称、bundle名称等。 |
**示例:**
......@@ -210,9 +210,9 @@ onConfigurationUpdate(newConfig: Configuration): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| newConfig | [Configuration](js-apis-app-ability-configuration.md) | 是 | 表示需要更新的配置信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| newConfig | [Configuration](js-apis-app-ability-configuration.md) | 是 | 表示需要更新的配置信息。 |
**示例:**
......@@ -236,9 +236,9 @@ onDump(params: Array\<string>): Array\<string>;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| params | Array\<string> | 是 | 表示命令形式的参数。|
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| params | Array\<string> | 是 | 表示命令形式的参数。|
**示例:**
......
# @ohos.app.ability.StartOptions (StartOptions)
StartOptions模块对系统的基本通信组件进行查询和设置的能力
StartOptions可以作为[startAbility](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability-1)的入参,用于指定目标Ability的窗口模式
> **说明:**
>
......
# @ohos.app.ability.UIAbility (UIAbility)
Ability模块提供对Ability生命周期、上下文环境等调用管理的能力,包括Ability创建、销毁、转储客户端信息等。
UIAbility是包含UI界面的应用组件,提供组件创建、销毁、前后台切换等生命周期回调,同时也具备组件协同的能力,组件协同主要提供如下常用功能:
该模块提供以下Ability相关的常用功能:
- [Caller](#caller):通用组件Caller通信客户端调用接口, 用来向通用组件服务端发送约定数据。
- [Callee](#callee):通用组件服务端注册和解除客户端caller通知送信的callback接口。
- [Caller](#caller):由[startAbilityByCall](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartabilitybycall)接口返回,CallerAbility(调用者)可使用Caller与CalleeAbility(被调用者)进行通信。
- [Callee](#callee):UIAbility的内部对象,CalleeAbility(被调用者)可以通过Callee与Caller进行通信。
> **说明:**
>
......@@ -25,11 +23,11 @@ import Ability from '@ohos.app.ability.UIAbility';
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| context | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | 是 | 否 | 上下文。 |
| launchWant | [Want](js-apis-app-ability-want.md) | 是 | 否 | Ability启动时的参数。 |
| lastRequestWant | [Want](js-apis-app-ability-want.md) | 是 | 否 | Ability最后请求时的参数。|
| launchWant | [Want](js-apis-app-ability-want.md) | 是 | 否 | UIAbility启动时的参数。 |
| lastRequestWant | [Want](js-apis-app-ability-want.md) | 是 | 否 | UIAbility最后请求时的参数。 |
| callee | [Callee](#callee) | 是 | 否 | 调用Stub(桩)服务对象。|
## Ability.onCreate
## UIAbility.onCreate
onCreate(want: Want, param: AbilityConstant.LaunchParam): void;
......@@ -39,10 +37,10 @@ Ability创建时回调,执行初始化业务逻辑操作。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | 当前Ability的Want类型信息,包括ability名称、bundle名称等。 |
| param | [AbilityConstant.LaunchParam](js-apis-app-ability-abilityConstant.md#abilityconstantlaunchparam) | 是 | 创建&nbsp;ability、上次异常退出的原因信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | 当前UIAbility的Want类型信息,包括ability名称、bundle名称等。 |
| param | [AbilityConstant.LaunchParam](js-apis-app-ability-abilityConstant.md#abilityconstantlaunchparam) | 是 | 创建UIAbility、上次异常退出的原因信息。 |
**示例:**
......@@ -55,7 +53,7 @@ Ability创建时回调,执行初始化业务逻辑操作。
```
## Ability.onWindowStageCreate
## UIAbility.onWindowStageCreate
onWindowStageCreate(windowStage: window.WindowStage): void
......@@ -65,9 +63,9 @@ onWindowStageCreate(windowStage: window.WindowStage): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| windowStage | [window.WindowStage](js-apis-window.md#windowstage9) | 是 | WindowStage相关信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| windowStage | [window.WindowStage](js-apis-window.md#windowstage9) | 是 | WindowStage相关信息。 |
**示例:**
......@@ -80,7 +78,7 @@ onWindowStageCreate(windowStage: window.WindowStage): void
```
## Ability.onWindowStageDestroy
## UIAbility.onWindowStageDestroy
onWindowStageDestroy(): void
......@@ -99,7 +97,7 @@ onWindowStageDestroy(): void
```
## Ability.onWindowStageRestore
## UIAbility.onWindowStageRestore
onWindowStageRestore(windowStage: window.WindowStage): void
......@@ -109,9 +107,9 @@ onWindowStageRestore(windowStage: window.WindowStage): void
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| windowStage | [window.WindowStage](js-apis-window.md#windowstage9) | 是 | WindowStage相关信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| windowStage | [window.WindowStage](js-apis-window.md#windowstage9) | 是 | WindowStage相关信息。 |
**示例:**
......@@ -124,7 +122,7 @@ onWindowStageRestore(windowStage: window.WindowStage): void
```
## Ability.onDestroy
## UIAbility.onDestroy
onDestroy(): void | Promise&lt;void&gt;;
......@@ -143,7 +141,7 @@ Ability生命周期回调,在销毁时回调,执行资源清理等操作。
```
## Ability.onForeground
## UIAbility.onForeground
onForeground(): void;
......@@ -162,7 +160,7 @@ Ability生命周期回调,当应用从后台转到前台时触发。
```
## Ability.onBackground
## UIAbility.onBackground
onBackground(): void;
......@@ -181,7 +179,7 @@ Ability生命周期回调,当应用从前台转到后台时触发。
```
## Ability.onContinue
## UIAbility.onContinue
onContinue(wantParam: { [key: string]: Object }): AbilityConstant.OnContinueResult;
......@@ -191,15 +189,15 @@ onContinue(wantParam: { [key: string]: Object }): AbilityConstant.OnContinueResu
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| wantParam | {[key:&nbsp;string]:&nbsp;any} | 是 | want相关参数。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| wantParam | {[key:&nbsp;string]:&nbsp;any} | 是 | want相关参数。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| [AbilityConstant.OnContinueResult](js-apis-app-ability-abilityConstant.md#abilityconstantoncontinueresult) | 继续的结果。 |
| 类型 | 说明 |
| -------- | -------- |
| [AbilityConstant.OnContinueResult](js-apis-app-ability-abilityConstant.md#abilityconstantoncontinueresult) | 继续的结果。 |
**示例:**
......@@ -215,7 +213,7 @@ onContinue(wantParam: { [key: string]: Object }): AbilityConstant.OnContinueResu
```
## Ability.onNewWant
## UIAbility.onNewWant
onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;
......@@ -225,10 +223,10 @@ onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | Want类型参数,如ability名称,包名等。 |
| launchParams | [AbilityConstant.LaunchParam](js-apis-app-ability-abilityConstant.md#abilityconstantlaunchparam) | 是 | UIAbility启动的原因、上次异常退出的原因信息。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | 是 | Want类型参数,如ability名称,包名等。 |
| launchParams | [AbilityConstant.LaunchParam](js-apis-app-ability-abilityConstant.md#abilityconstantlaunchparam) | 是 | UIAbility启动的原因、上次异常退出的原因信息。 |
**示例:**
......@@ -241,7 +239,7 @@ onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;
}
```
## Ability.onDump
## UIAbility.onDump
onDump(params: Array\<string>): Array\<string>;
......@@ -251,9 +249,9 @@ onDump(params: Array\<string>): Array\<string>;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| params | Array\<string> | 是 | 表示命令形式的参数。|
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| params | Array\<string> | 是 | 表示命令形式的参数。|
**示例:**
......@@ -267,7 +265,7 @@ onDump(params: Array\<string>): Array\<string>;
```
## Ability.onSaveState
## UIAbility.onSaveState
onSaveState(reason: AbilityConstant.StateType, wantParam : {[key: string]: Object}): AbilityConstant.OnSaveResult;
......@@ -277,16 +275,16 @@ onSaveState(reason: AbilityConstant.StateType, wantParam : {[key: string]: Objec
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| reason | [AbilityConstant.StateType](js-apis-application-abilityConstant.md#abilityconstantstatetype) | 是 | 回调保存状态的原因。 |
| wantParam | {[key:&nbsp;string]:&nbsp;any} | 是 | want相关参数。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| reason | [AbilityConstant.StateType](js-apis-application-abilityConstant.md#abilityconstantstatetype) | 是 | 回调保存状态的原因。 |
| wantParam | {[key:&nbsp;string]:&nbsp;any} | 是 | want相关参数。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| AbilityConstant.OnSaveResult | 是否同意保存当前Ability的状态。 |
| 类型 | 说明 |
| -------- | -------- |
| AbilityConstant.OnSaveResult | 是否同意保存当前Ability的状态。 |
**示例:**
......@@ -325,9 +323,9 @@ call(method: string, data: rpc.Parcelable): Promise&lt;void&gt;;
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | Promise形式返回应答。 |
| 类型 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | Promise形式返回应答。 |
**错误码:**
......@@ -476,7 +474,7 @@ release(): void;
主动释放通用组件服务端的通信接口。
**系统能力**:SystemCapability.Ability.AbilityRuntime.AbilityCore
**系统能力**:SystemCapability.UIAbility.UIAbilityRuntime.UIAbilityCore
**错误码:**
......@@ -523,9 +521,9 @@ release(): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | [OnReleaseCallback](#onreleasecallback) | 是 | 返回onRelease回调结果。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | [OnReleaseCallback](#onreleasecallback) | 是 | 返回onRelease回调结果。 |
**示例:**
......@@ -565,10 +563,10 @@ release(): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听releaseCall事件,固定为'release'。 |
| callback | [OnReleaseCallback](#onreleasecallback) | 是 | 返回onRelease回调结果。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听releaseCall事件,固定为'release'。 |
| callback | [OnReleaseCallback](#onreleasecallback) | 是 | 返回onRelease回调结果。 |
**错误码:**
......@@ -784,13 +782,13 @@ off(method: string): void;
解除通用组件服务端注册消息通知callback。
**系统能力**:SystemCapability.Ability.AbilityRuntime.AbilityCore
**系统能力**:SystemCapability.UIAbility.UIAbilityRuntime.UIAbilityCore
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| method | string | 是 | 已注册的通知事件字符串。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| method | string | 是 | 已注册的通知事件字符串。 |
**错误码:**
......
# @ohos.app.form.FormExtensionAbility (FormExtensionAbility)
FormExtensionAbility模块提供了卡片扩展相关接口
FormExtensionAbility为卡片扩展模块,提供卡片创建、销毁、刷新等生命周期回调
> **说明:**
>
......@@ -18,8 +18,8 @@ import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
**系统能力**:SystemCapability.Ability.Form
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------- | ------------------------------------------------------- | ---- | ---- | --------------------------------------------------- |
| context | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | 是 | 否 | FormExtensionAbility的上下文环境,继承自ExtensionContext。 |
| ------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| context | [FormExtensionContext](js-apis-inner-application-formExtensionContext.md) | 是 | 否 | FormExtensionAbility的上下文环境,继承自[ExtensionContext](js-apis-inner-application-extensionContext.md)。 |
## onAddForm
......
......@@ -161,7 +161,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
| bgMode | [BackgroundMode](#backgroundmode8) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击后跳转的界面。 |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
......@@ -253,7 +253,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
| bgMode | [BackgroundMode](#backgroundmode8) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击跳转的界面。 |
......@@ -339,7 +339,7 @@ stopBackgroundRunning(context: Context, callback: AsyncCallback&lt;void&gt;): vo
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
**示例**
......@@ -395,7 +395,7 @@ stopBackgroundRunning(context: Context): Promise&lt;void&gt;
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
**返回值**
......
......@@ -31,7 +31,7 @@ getRdbStore(context: Context, config: StoreConfig, version: number, callback: As
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------ | ---- | ------------------------------------------------------------ |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-app-context.md)。 |
| config | [StoreConfig](#storeconfig) | 是 | 与此RDB存储相关的数据库配置。 |
| version | number | 是 | 数据库版本。<br>目前暂不支持通过version自动识别数据库升级降级操作,只能由开发者自行维护。 |
| callback | AsyncCallback&lt;[RdbStore](#rdbstore)&gt; | 是 | 指定callback回调函数,返回RdbStore对象。 |
......@@ -92,7 +92,7 @@ getRdbStore(context: Context, config: StoreConfig, version: number): Promise&lt;
| 参数名 | 类型 | 必填 | 说明 |
| ------- | --------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-app-context.md)。 |
| config | [StoreConfig](#storeconfig) | 是 | 与此RDB存储相关的数据库配置。 |
| version | number | 是 | 数据库版本。<br>目前暂不支持通过version自动识别数据库升级降级操作,只能由开发者自行维护。 |
......@@ -156,7 +156,7 @@ deleteRdbStore(context: Context, name: string, callback: AsyncCallback&lt;void&g
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-app-context.md)。 |
| name | string | 是 | 数据库名称。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 指定callback回调函数。 |
......@@ -214,7 +214,7 @@ deleteRdbStore(context: Context, name: string): Promise&lt;void&gt;
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------- | ---- | ------------------------------------------------------------ |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用的上下文。 <br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-app-context.md)。 |
| name | string | 是 | 数据库名称。 |
**返回值**
......
......@@ -65,7 +65,7 @@ stat(file: string|number): Promise&lt;Stat&gt;
**示例:**
```js
let filePath = pathDir + "test.txt";
let filePath = pathDir + "/test.txt";
fs.stat(filePath).then((stat) => {
console.info("get file info succeed, the size of file is " + stat.size);
}).catch((err) => {
......@@ -330,8 +330,8 @@ copyFile(src: string|number, dest: string|number, mode?: number): Promise&lt;voi
**示例:**
```js
let srcPath = pathDir + "srcDir/test.txt";
let dstPath = pathDir + "dstDir/test.txt";
let srcPath = pathDir + "/srcDir/test.txt";
let dstPath = pathDir + "/dstDir/test.txt";
fs.copyFile(srcPath, dstPath).then(() => {
console.info("copy file succeed");
}).catch((err) => {
......@@ -359,8 +359,8 @@ copyFile(src: string|number, dest: string|number, mode?: number, callback: Async
**示例:**
```js
let srcPath = pathDir + "srcDir/test.txt";
let dstPath = pathDir + "dstDir/test.txt";
let srcPath = pathDir + "/srcDir/test.txt";
let dstPath = pathDir + "/dstDir/test.txt";
fs.copyFile(srcPath, dstPath, (err) => {
if (err) {
console.info("copy file failed with error message: " + err.message + ", error code: " + err.code);
......@@ -390,8 +390,8 @@ copyFileSync(src: string|number, dest: string|number, mode?: number): void
**示例:**
```js
let srcPath = pathDir + "srcDir/test.txt";
let dstPath = pathDir + "dstDir/test.txt";
let srcPath = pathDir + "/srcDir/test.txt";
let dstPath = pathDir + "/dstDir/test.txt";
fs.copyFileSync(srcPath, dstPath);
```
......@@ -419,7 +419,7 @@ mkdir(path: string): Promise&lt;void&gt;
**示例:**
```js
let dirPath = pathDir + '/testDir';
let dirPath = pathDir + "/testDir";
fs.mkdir(dirPath).then(() => {
console.info("mkdir succeed");
}).catch((err) => {
......@@ -446,7 +446,7 @@ mkdir(path: string, callback: AsyncCallback&lt;void&gt;): void
**示例:**
```js
let dirPath = pathDir + '/testDir';
let dirPath = pathDir + "/testDir";
fs.mkdir(dirPath, (err) => {
if (err) {
console.info("mkdir failed with error message: " + err.message + ", error code: " + err.code);
......@@ -474,7 +474,7 @@ mkdirSync(path: string): void
**示例:**
```js
let dirPath = pathDir + '/testDir';
let dirPath = pathDir + "/testDir";
fs.mkdirSync(dirPath);
```
......@@ -698,7 +698,7 @@ rmdir(path: string): Promise&lt;void&gt;
**示例:**
```js
let dirPath = pathDir + '/testDir';
let dirPath = pathDir + "/testDir";
fs.rmdir(dirPath).then(() => {
console.info("rmdir succeed");
}).catch((err) => {
......@@ -725,7 +725,7 @@ rmdir(path: string, callback: AsyncCallback&lt;void&gt;): void
**示例:**
```js
let dirPath = pathDir + '/testDir';
let dirPath = pathDir + "/testDir";
fs.rmdir(dirPath, (err) => {
if (err) {
console.info("rmdir failed with error message: " + err.message + ", error code: " + err.code);
......@@ -753,7 +753,7 @@ rmdirSync(path: string): void
**示例:**
```js
let dirPath = pathDir + '/testDir';
let dirPath = pathDir + "/testDir";
fs.rmdirSync(dirPath);
```
......@@ -1235,7 +1235,7 @@ rename(oldPath: string, newPath: string): Promise&lt;void&gt;
```js
let srcFile = pathDir + "/test.txt";
let dstFile = pathDir + '/new.txt';
let dstFile = pathDir + "/new.txt";
fs.rename(srcFile, dstFile).then(() => {
console.info("rename succeed");
}).catch((err) => {
......@@ -1263,7 +1263,7 @@ rename(oldPath: string, newPath: string, callback: AsyncCallback&lt;void&gt;): v
```js
let srcFile = pathDir + "/test.txt";
let dstFile = pathDir + '/new.txt';
let dstFile = pathDir + "/new.txt";
fs.rename(srcFile, dstFile, (err) => {
if (err) {
console.info("rename failed with error message: " + err.message + ", error code: " + err.code);
......@@ -1292,7 +1292,7 @@ renameSync(oldPath: string, newPath: string): void
```js
let srcFile = pathDir + "/test.txt";
let dstFile = pathDir + '/new.txt';
let dstFile = pathDir + "/new.txt";
fs.renameSync(srcFile, dstFile);
```
......@@ -1498,7 +1498,7 @@ symlink(target: string, srcPath: string): Promise&lt;void&gt;
```js
let srcFile = pathDir + "/test.txt";
let dstFile = pathDir + '/test';
let dstFile = pathDir + "/test";
fs.symlink(srcFile, dstFile).then(() => {
console.info("symlink succeed");
}).catch((err) => {
......@@ -1526,7 +1526,7 @@ symlink(target: string, srcPath: string, callback: AsyncCallback&lt;void&gt;): v
```js
let srcFile = pathDir + "/test.txt";
let dstFile = pathDir + '/test';
let dstFile = pathDir + "/test";
fs.symlink(srcFile, dstFile, (err) => {
if (err) {
console.info("symlink failed with error message: " + err.message + ", error code: " + err.code);
......@@ -1555,7 +1555,7 @@ symlinkSync(target: string, srcPath: string): void
```js
let srcFile = pathDir + "/test.txt";
let dstFile = pathDir + '/test';
let dstFile = pathDir + "/test";
fs.symlinkSync(srcFile, dstFile);
```
......@@ -1733,8 +1733,8 @@ moveFile(src: string, dest: string, mode?: number): Promise<void>;
**示例:**
```js
let srcPath = pathDir + '/source.txt';
let destPath = pathDir + '/dest.txt';
let srcPath = pathDir + "/source.txt";
let destPath = pathDir + "/dest.txt";
fs.moveFile(srcPath, destPath, 0).then(() => {
console.info("move file succeed");
}).catch((err) => {
......@@ -1762,8 +1762,8 @@ moveFile(src: string, dest: string, mode?: number, callback: AsyncCallback<void>
**示例:**
```js
let srcPath = pathDir + '/source.txt';
let destPath = pathDir + '/dest.txt';
let srcPath = pathDir + "/source.txt";
let destPath = pathDir + "/dest.txt";
fs.moveFile(srcPath, destPath, 0, (err) => {
if (err) {
console.info("move file failed with error message: " + err.message + ", error code: " + err.code);
......@@ -1792,8 +1792,8 @@ moveFile(src: string, dest: string, mode?: number): void;
**示例:**
```js
let srcPath = pathDir + '/source.txt';
let destPath = pathDir + '/dest.txt';
let srcPath = pathDir + "/source.txt";
let destPath = pathDir + "/dest.txt";
fs.moveFileSync(srcPath, destPath, 0);
console.info("move file succeed");
```
......
......@@ -2,9 +2,9 @@
该模块提供文件存储管理能力,包括文件基本管理、文件目录管理、文件信息统计、文件流式读写等常用功能。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块自API 9开始废弃,建议使用[@ohos.file.fs](./js-apis-file-fs.md)替代。
> 本模块自API 9开始废弃,建议使用[@ohos.file.fs](js-apis-file-fs.md)替代。
## 导入模块
......@@ -29,7 +29,7 @@ class MainAbility extends Ability {
}
```
Stage模型context的具体获取方法参见[Stage模型](js-apis-ability-context.md#abilitycontext)
Stage模型context的具体获取方法参见[Stage模型](js-apis-inner-application-uiabilitycontext.md)
**FA模型**
......
......@@ -96,6 +96,9 @@ request(url: string, callback: AsyncCallback\<HttpResponse\>):void
根据URL地址,发起HTTP网络请求,使用callback方式作为异步方法。
>**说明:**
>此接口仅支持数据大小为5M以内的数据传输。
**需要权限**:ohos.permission.INTERNET
**系统能力**:SystemCapability.Communication.NetStack
......@@ -144,6 +147,9 @@ request(url: string, options: HttpRequestOptions, callback: AsyncCallback\<HttpR
根据URL地址和相关配置项,发起HTTP网络请求,使用callback方式作为异步方法。
>**说明:**
>此接口仅支持数据大小为5M以内的数据传输。
**需要权限**:ohos.permission.INTERNET
**系统能力**:SystemCapability.Communication.NetStack
......@@ -227,6 +233,9 @@ request(url: string, options? : HttpRequestOptions): Promise\<HttpResponse\>
根据URL地址,发起HTTP网络请求,使用Promise方式作为异步方法。
>**说明:**
>此接口仅支持数据大小为5M以内的数据传输。
**需要权限**:ohos.permission.INTERNET
**系统能力**:SystemCapability.Communication.NetStack
......@@ -530,7 +539,7 @@ on(type: 'headerReceive', callback: AsyncCallback\<Object\>): void
订阅HTTP Response Header 事件。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>此接口已废弃,建议使用[on('headersReceive')<sup>8+</sup>](#onheadersreceive8)替代。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -556,7 +565,7 @@ off(type: 'headerReceive', callback?: AsyncCallback\<Object\>): void
取消订阅HTTP Response Header 事件。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>
>1. 此接口已废弃,建议使用[off('headersReceive')<sup>8+</sup>](#offheadersreceive8)替代。
>
......@@ -606,7 +615,7 @@ off(type: 'headersReceive', callback?: Callback\<Object\>): void
取消订阅HTTP Response Header 事件。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -675,7 +684,7 @@ off(type: 'dataReceive', callback?: Callback\<ArrayBuffer\>): void
取消订阅HTTP流式响应数据接收事件。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -722,7 +731,7 @@ off(type: 'dataEnd', callback?: Callback\<void\>): void
取消订阅HTTP流式响应数据接收完毕事件。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -769,7 +778,7 @@ off(type: 'dataProgress', callback?: Callback\<{ receiveSize: number, totalSize:
取消订阅HTTP流式响应数据接收进度事件。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......
......@@ -372,7 +372,7 @@ remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback\<void\>):
| 参数名 | 类型 | 必填 | 说明 |
| -------- | --------------------- | ---- | -------------------- |
| hashCode | string | 是 | 通知唯一ID。可以通过[onConsume](#onconsume)回调的入参[SubscribeCallbackData](js-apis-notification.md#subscribecallbackdata)获取其内部[NotificationRequest](#notificationrequest)对象中的hashCode。 |
| hashCode | string | 是 | 通知唯一ID。可以通过[onConsume](#onconsume)回调的入参[SubscribeCallbackData](js-apis-notification.md#subscribecallbackdata)获取其内部[NotificationRequest](js-apis-inner-notification-notificationRequest.md#notificationrequest)对象中的hashCode。 |
| reason | [RemoveReason](#removereason) | 是 | 通知删除原因。 |
| callback | AsyncCallback\<void\> | 是 | 删除指定通知回调函数。 |
......
......@@ -233,7 +233,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
| bgMode | [BackgroundMode](#backgroundmode) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击后跳转的界面。 |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
......@@ -311,7 +311,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
| bgMode | [BackgroundMode](#backgroundmode) | 是 | 向系统申请的后台模式。 |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | 是 | 通知参数,用于指定长时任务通知点击跳转的界面。 |
......@@ -388,7 +388,7 @@ stopBackgroundRunning(context: Context, callback: AsyncCallback&lt;void&gt;): vo
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
| callback | AsyncCallback&lt;void&gt; | 是 | callback形式返回启动长时任务的结果。 |
**错误码**
......@@ -444,7 +444,7 @@ stopBackgroundRunning(context: Context): Promise&lt;void&gt;
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------- | ---- | ---------------------------------------- |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-ability-context.md)。 |
| context | Context | 是 | 应用运行的上下文。<br>FA模型的应用Context定义见[Context](js-apis-inner-app-context.md)<br>Stage模型的应用Context定义见[Context](js-apis-inner-application-context.md)。 |
**返回值**
......
......@@ -346,6 +346,7 @@ isLastWorkTimeOut(workId: number, callback : AsyncCallback\<void>): boolean
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check workInfo failed. |
**示例**
......@@ -391,6 +392,7 @@ isLastWorkTimeOut(workId: number): Promise\<boolean>
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check workInfo failed. |
**示例**
......
......@@ -281,7 +281,7 @@ getState(callback: AsyncCallback\<SocketStateBase\>): void
获取UDPSocket状态。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -327,7 +327,7 @@ getState(): Promise\<SocketStateBase\>
获取UDPSocket状态。使用Promise方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -366,7 +366,7 @@ setExtraOptions(options: UDPExtraOptions, callback: AsyncCallback\<void\>): void
设置UDPSocket连接的其他属性。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -420,7 +420,7 @@ setExtraOptions(options: UDPExtraOptions): Promise\<void\>
设置UDPSocket连接的其他属性。使用Promise方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -502,7 +502,7 @@ off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: Soc
取消订阅UDPSocket连接的接收消息事件。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -562,7 +562,7 @@ off(type: 'listening' | 'close', callback?: Callback\<void\>): void
取消订阅UDPSocket连接的数据包消息事件或关闭事件。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -626,7 +626,7 @@ off(type: 'error', callback?: ErrorCallback): void
取消订阅UDPSocket连接的error事件。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -831,7 +831,7 @@ connect(options: TCPConnectOptions, callback: AsyncCallback\<void\>): void
连接到指定的IP地址和端口。使用callback方法作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -914,7 +914,7 @@ send(options: TCPSendOptions, callback: AsyncCallback\<void\>): void
通过TCPSocket连接发送数据。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -963,7 +963,7 @@ send(options: TCPSendOptions): Promise\<void\>
通过TCPSocket连接发送数据。使用Promise方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1087,7 +1087,7 @@ getRemoteAddress(callback: AsyncCallback\<NetAddress\>): void
获取对端Socket地址。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1132,7 +1132,7 @@ getRemoteAddress(): Promise\<NetAddress\>
获取对端Socket地址。使用Promise方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1176,7 +1176,7 @@ getState(callback: AsyncCallback\<SocketStateBase\>): void
获取TCPSocket状态。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind或connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1221,7 +1221,7 @@ getState(): Promise\<SocketStateBase\>
获取TCPSocket状态。使用Promise方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind或connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1265,7 +1265,7 @@ setExtraOptions(options: TCPExtraOptions, callback: AsyncCallback\<void\>): void
设置TCPSocket连接的其他属性。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind或connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1321,7 +1321,7 @@ setExtraOptions(options: TCPExtraOptions): Promise\<void\>
设置TCPSocket连接的其他属性,使用Promise方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>bind或connect方法调用成功后,才可调用此方法。
**需要权限**:ohos.permission.INTERNET
......@@ -1406,7 +1406,7 @@ off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: Sock
取消订阅TCPSocket连接的接收消息事件。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -1466,7 +1466,7 @@ off(type: 'connect' | 'close', callback?: Callback\<void\>): void
取消订阅TCPSocket的连接事件或关闭事件。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -1530,7 +1530,7 @@ off(type: 'error', callback?: ErrorCallback): void
取消订阅TCPSocket连接的error事件。使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......
......@@ -32,7 +32,7 @@ import stationary from '@ohos.stationary'
**系统能力**:SystemCapability.Msdp.DeviceStatus.Stationary
| 名称 | 描述说明 |
| 名称 | 说明 |
| -------- | -------- |
| still | 绝对静止。 |
| relativeStill | 相对静止。 |
......
......@@ -5,7 +5,7 @@
[系统参数](../../../device-dev/subsystems/subsys-boot-init-sysparam.md)
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> - 本模块接口从API version 9开始不再维护,建议使用新接口[`@ohos.systemParameterV9`](js-apis-system-parameterV9.md)替代。
> - 本模块接口从API version 9开始不再维护,建议使用新接口[`@ohos.systemParameterEnhance`](js-apis-system-parameterEnhance.md)替代。
> - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> - 本模块接口为系统接口。
> - 由于系统参数都是各个系统服务的内部信息和控制参数,每个系统参数都有各自不同的DAC和MAC访问控制权限,三方应用不能使用此类接口。
......
......@@ -459,7 +459,7 @@ off(type: 'open', callback?: AsyncCallback\<Object\>): void
取消订阅WebSocket的打开事件,使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -490,7 +490,7 @@ on(type: 'message', callback: AsyncCallback\<string | ArrayBuffer\>): void
订阅WebSocket的接收到服务器消息事件,使用callback方式作为异步方法。每个消息最大长度为4K,超过4K自动分片。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>AsyncCallback中的数据可以是字符串(API 6)或ArrayBuffer(API 8)。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -518,7 +518,7 @@ off(type: 'message', callback?: AsyncCallback\<string | ArrayBuffer\>): void
取消订阅WebSocket的接收到服务器消息事件,使用callback方式作为异步方法。每个消息最大长度为4K,超过4K自动分片。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>AsyncCallback中的数据可以是字符串(API 6)或ArrayBuffer(API 8)。
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
......@@ -570,7 +570,7 @@ off(type: 'close', callback?: AsyncCallback\<{ code: number, reason: string }\>)
取消订阅WebSocket的关闭事件,使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......@@ -621,7 +621,7 @@ off(type: 'error', callback?: ErrorCallback): void
取消订阅WebSocket的Error事件,使用callback方式作为异步方法。
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。
**系统能力**:SystemCapability.Communication.NetStack
......
......@@ -59,6 +59,7 @@
- 通信与连接
- [NFC错误码](errorcode-nfc.md)
- [RPC错误码](errorcode-rpc.md)
- [蓝牙服务子系统错误码](errorcode-bluetoothManager.md)
- 系统基础能力
- [无障碍子系统错误码](errorcode-accessibility.md)
- [Faultlogger错误码](errorcode-faultlogger.md)
......
......@@ -153,7 +153,7 @@ ATM (AccessTokenManager) 是OpenHarmony上基于AccessToken构建的统一的应
- 权限申请
开发者需要在配置文件中[声明目标权限](accesstoken-guidelines.md#权限申请声明)
开发者需要在配置文件中[声明目标权限](accesstoken-guidelines.md#配置文件权限声明)
- 权限授权
......
......@@ -20,6 +20,10 @@
- [多HAP使用规则](quick-start/multi-hap-rules.md)
- [多HAP运行机制及数据通信方式](quick-start/multi-hap-principles.md)
- [应用程序包安装和卸载流程](quick-start/application-package-install-uninstall.md)
- [应用程序包更新流程](quick-start/application-package-update.md)
- 应用程序包快速修复
- [快速修复概述](quick-start/quickfix-principles.md)
- [快速修复调试指导](quick-start/quickfix-debug.md)
- 应用配置文件(Stage模型)
- [应用配置文件概述(Stage模型)](quick-start/application-configuration-file-overview-stage.md)
- [app.json5配置文件](quick-start/app-configuration-file.md)
......@@ -63,6 +67,7 @@
- [DataShareExtensionAbility(仅对系统应用开放)](application-models/datashareextensionability.md)
- [FormExtensionAbility(服务卡片)](application-models/widget-development-stage.md)
- [AccessibilityExtensionAbility](application-models/accessibilityextensionability.md)
- [EnterpriseAdminExtensionAbility](application-models/enterprise-extensionAbility.md)
- [InputMethodExtensionAbility](application-models/inputmethodextentionability.md)
- [WindowExtensionAbility](application-models/windowextensionability.md)
- [AbilityStage组件容器](application-models/abilitystage.md)
......@@ -74,7 +79,7 @@
- [使用显式Want启动Ability](application-models/ability-startup-with-explicit-want.md)
- [使用隐式Want打开网址](application-models/ability-startup-with-implicit-want.md)
- [应用间使用Want分享数据](application-models/data-share-via-want.md)
- [组件启动规则](application-models/component-startup-rules.md)
- [组件启动规则(Stage模型)](application-models/component-startup-rules.md)
- 应用组件跨设备交互(流转)
- [流转概述](application-models/inter-device-interaction-hop-overview.md)
- [跨端迁移(仅对系统应用开放)](application-models/hop-cross-device-migration.md)
......@@ -83,15 +88,18 @@
- [进程模型](application-models/process-model-stage.md)
- 公共事件
- [公共事件简介](application-models/common-event-overview.md)
- [公共事件订阅](application-models/common-event-subscription.md)
- 公共事件订阅
- [公共事件订阅概述](application-models/common-event-subscription-overview.md)
- [动态订阅公共事件](application-models/common-event-subscription.md)
- [静态订阅公共事件(仅对系统应用开放)](application-models/common-event-static-subscription.md)
- [取消动态订阅公共事件](application-models/common-event-unsubscription.md)
- [公共事件发布](application-models/common-event-publish.md)
- [公共事件取消订阅](application-models/common-event-unsubscription.md)
- [后台服务](application-models/background-services.md)
- 线程间通信
- [线程模型](application-models/thread-model-stage.md)
- [使用Emitter进行线程间通信](application-models/itc-with-emitter.md)
- [使用Worker进行线程间通信](application-models/itc-with-worker.md)
- 后台任务管理
- 任务管理
- [任务管理场景介绍](application-models/mission-management-overview.md)
- [任务管理与启动模式](application-models/mission-management-launch-type.md)
- [页面栈及任务链](application-models/page-mission-stack.md)
......@@ -130,6 +138,7 @@
- [服务卡片开发指导](application-models/widget-development-fa.md)
- [FA模型的Context](application-models/application-context-fa.md)
- [信息传递载体Want](application-models/want-fa.md)
- [组件启动规则(FA模型)](application-models/component-startup-rules-fa.md)
- 进程间通信
- [进程模型](application-models/process-model-fa.md)
- [公共事件](application-models/common-event-fa.md)
......@@ -340,6 +349,7 @@
- [HTTP数据请求](connectivity/http-request.md)
- [WebSocket连接](connectivity/websocket-connection.md)
- [Socket连接](connectivity/socket-connection.md)
- [网络共享](connectivity/net-sharing.md)
- IPC与RPC通信
- [IPC与RPC通信概述](connectivity/ipc-rpc-overview.md)
- [IPC与RPC通信开发指导](connectivity/ipc-rpc-development-guideline.md)
......@@ -422,14 +432,6 @@
- [自动化测试框架使用指导](application-test/arkxtest-guidelines.md)
- [SmartPerf性能工具使用指导](application-test/smartperf-guidelines.md)
- [wukong稳定性工具使用指导](application-test/wukong-guidelines.md)
- [IDL工具规格及使用说明书](IDL/idl-guidelines.md)
- Native API相关指导
- [Native API在应用工程中的使用指导](napi/napi-guidelines.md)
- [Drawing开发指导](napi/drawing-guidelines.md)
- [Rawfile开发指导](napi/rawfile-guidelines.md)
- [NativeWindow开发指导](napi/native-window-guidelines.md)
- [使用MindSpore Lite引擎进行模型推理](napi/mindspore-lite-guidelines.md)
- [Neural Network Runtime对接AI推理框架开发指导](napi/neural-network-runtime-guidelines.md)
- 一次开发,多端部署
- [前言](key-features/multi-device-app-dev/foreword.md)
- [简介](key-features/multi-device-app-dev/introduction.md)
......@@ -477,6 +479,14 @@
- [功能开发的一多能力介绍](key-features/multi-device-app-dev/development-intro.md)
- [案例应用](key-features/multi-device-app-dev/case.md)
- [常见问题](key-features/multi-device-app-dev/faq.md)
- [IDL工具规格及使用说明书](IDL/idl-guidelines.md)
- Native API相关指导
- [Native API在应用工程中的使用指导](napi/napi-guidelines.md)
- [Drawing开发指导](napi/drawing-guidelines.md)
- [Rawfile开发指导](napi/rawfile-guidelines.md)
- [NativeWindow开发指导](napi/native-window-guidelines.md)
- [使用MindSpore Lite引擎进行模型推理](napi/mindspore-lite-guidelines.md)
- [Neural Network Runtime对接AI推理框架开发指导](napi/neural-network-runtime-guidelines.md)
- 工具
- [DevEco Studio(OpenHarmony)使用指南](quick-start/deveco-studio-user-guide-for-openharmony.md)
- 调试工具
......@@ -485,10 +495,10 @@
- 打包拆包工具
- [打包工具](tools/packing-tool.md)
- [拆包工具](tools/unpacking-tool.md)
- [anm工具](tools/anm-tool.md)
- [cem工具](tools/cem-tool.md)
- [anm工具](tools/anm-tool.md)
- 示例教程
- [示例代码](https://gitee.com/openharmony/applications_app_samples/blob/monthly_20221018/README_zh.md)
- [示例代码](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-3.2-Release/README_zh.md)
- [Codelabs](https://gitee.com/openharmony/codelabs/blob/master/README.md)
- API参考
- [系统能力SystemCapability使用指南](reference/syscap.md)
......@@ -821,13 +831,6 @@
- [@ohos.app.form.FormExtensionAbility (FormExtensionAbility)](reference/apis/js-apis-app-form-formExtensionAbility.md)
- [@ohos.application.DataShareExtensionAbility (数据共享扩展能力)](reference/apis/js-apis-application-dataShareExtensionAbility.md)
- [@ohos.application.StaticSubscriberExtensionAbility (StaticSubscriberExtensionAbility)](reference/apis/js-apis-application-staticSubscriberExtensionAbility.md)
- Stage模型能力的接口(待停用)
- [@ohos.application.AbilityConstant (AbilityConstant)](reference/apis/js-apis-application-abilityConstant.md)
- [@ohos.application.AbilityStage (AbilityStage)](reference/apis/js-apis-application-abilityStage.md)
- [@ohos.application.EnvironmentCallback (EnvironmentCallback)](reference/apis/js-apis-application-environmentCallback.md)
- [@ohos.application.FormExtension (FormExtension)](reference/apis/js-apis-application-formExtension.md)
- [@ohos.application.ServiceExtensionAbility (ServiceExtensionAbility)](reference/apis/js-apis-application-serviceExtensionAbility.md)
- [@ohos.application.StartOptions (StartOptions)](reference/apis/js-apis-application-startOptions.md)
- FA模型能力的接口
- [@ohos.ability.ability (Ability)](reference/apis/js-apis-ability-ability.md)
- [@ohos.ability.featureAbility (FeatureAbility模块)](reference/apis/js-apis-ability-featureAbility.md)
......@@ -839,6 +842,8 @@
- [@ohos.app.ability.appRecovery (appRecovery)](reference/apis/js-apis-app-ability-appRecovery.md)
- [@ohos.app.ability.Configuration (Configuration)](reference/apis/js-apis-app-ability-configuration.md)
- [@ohos.app.ability.ConfigurationConstant (ConfigurationConstant)](reference/apis/js-apis-app-ability-configurationConstant.md)
- [@ohos.app.ability.dataUriUtils (DataUriUtils模块)](reference/apis/js-apis-app-ability-dataUriUtils.md)
- [@ohos.app.ability.dialogRequest (dialogRequest模块)](reference/apis/js-apis-app-ability-dialogRequest.md)
- [@ohos.app.ability.errorManager (ErrorManager)](reference/apis/js-apis-app-ability-errorManager.md)
- [@ohos.app.ability.missionManager (missionManager)](reference/apis/js-apis-app-ability-missionManager.md)
- [@ohos.app.ability.quickFixManager (quickFixManager)](reference/apis/js-apis-app-ability-quickFixManager.md)
......@@ -976,6 +981,7 @@
- [@ohos.pluginComponent(PluginComponentManager)](reference/apis/js-apis-plugincomponent.md)
- [@ohos.promptAction (弹窗)](reference/apis/js-apis-promptAction.md)
- [@ohos.router (页面路由)](reference/apis/js-apis-router.md)
- [@ohos.measure (文本计算)](reference/apis/js-apis-measure.md)
- 图形图像
- [@ohos.animation.windowAnimationManager (窗口动画管理)](reference/apis/js-apis-windowAnimationManager.md)
- [@ohos.application.WindowExtensionAbility (窗口扩展能力)](reference/apis/js-apis-application-windowExtensionAbility.md)
......@@ -1034,12 +1040,12 @@
- [@ohos.file.fileExtensionInfo (公共文件访问与管理属性信息)](reference/apis/js-apis-fileExtensionInfo.md)
- [@ohos.file.fs (文件管理)](reference/apis/js-apis-file-fs.md)
- [@ohos.file.hash (文件哈希处理)](reference/apis/js-apis-file-hash.md)
- [@ohos.file.picker (选择器)](reference/apis/js-apis-file-picker.md)
- [@ohos.file.securityLabel (数据标签)](reference/apis/js-apis-file-securityLabel.md)
- [@ohos.file.statvfs (文件系统空间统计)](reference/apis/js-apis-file-statvfs.md)
- [@ohos.file.storageStatistics (应用空间统计)](reference/apis/js-apis-file-storage-statistics.md)
- [@ohos.file.volumeManager (卷管理)](reference/apis/js-apis-file-volumemanager.md)
- [@ohos.filemanagement.userFileManager (用户数据管理)](reference/apis/js-apis-userFileManager.md)
- [@ohos.multimedia.medialibrary (媒体库管理)](reference/apis/js-apis-medialibrary.md)
- 电话服务
- [@ohos.contact (联系人)](reference/apis/js-apis-contact.md)
- [@ohos.telephony.call (拨打电话)](reference/apis/js-apis-call.md)
......@@ -1052,12 +1058,13 @@
- [@ohos.net.connection (网络连接管理)](reference/apis/js-apis-net-connection.md)
- [@ohos.net.ethernet (以太网连接管理)](reference/apis/js-apis-net-ethernet.md)
- [@ohos.net.http (数据请求)](reference/apis/js-apis-http.md)
- [@ohos.net.policy (网络策略管理)](reference/apis/js-apis-net-policy.md)
- [@ohos.net.sharing (网络共享管理)](reference/apis/js-apis-net-sharing.md)
- [@ohos.net.socket (Socket连接)](reference/apis/js-apis-socket.md)
- [@ohos.net.webSocket (WebSocket连接)](reference/apis/js-apis-webSocket.md)
- [@ohos.request (上传下载)](reference/apis/js-apis-request.md)
- 通信与连接
- [@ohos.bluetooth (蓝牙)](reference/apis/js-apis-bluetooth.md)
- [@ohos.bluetoothManager (蓝牙)](reference/apis/js-apis-bluetoothManager.md)
- [@ohos.connectedTag (有源标签)](reference/apis/js-apis-connectedTag.md)
- [@ohos.nfc.cardEmulation (标准NFC-cardEmulation)](reference/apis/js-apis-cardEmulation.md)
- [@ohos.nfc.controller (标准NFC)](reference/apis/js-apis-nfcController.md)
......@@ -1166,6 +1173,7 @@
- [@ohos.uitest (UiTest)](reference/apis/js-apis-uitest.md)
- 已停止维护的接口
- [@ohos.backgroundTaskManager (后台任务管理)](reference/apis/js-apis-backgroundTaskManager.md)
- [@ohos.bluetooth (蓝牙)](reference/apis/js-apis-bluetooth.md)
- [@ohos.bundle (Bundle模块)](reference/apis/js-apis-Bundle.md)
- [@ohos.bundle.innerBundleManager (innerBundleManager模块)](reference/apis/js-apis-Bundle-InnerBundleManager.md)
- [@ohos.bundleState (设备使用信息统计)](reference/apis/js-apis-deviceUsageStatistics.md)
......@@ -1194,6 +1202,7 @@
- [@system.fetch (数据请求)](reference/apis/js-apis-system-fetch.md)
- [@system.file (文件存储)](reference/apis/js-apis-system-file.md)
- [@system.geolocation (地理位置)](reference/apis/js-apis-system-location.md)
- [@ohos.multimedia.medialibrary (媒体库管理)](reference/apis/js-apis-medialibrary.md)
- [@system.mediaquery (媒体查询)](reference/apis/js-apis-system-mediaquery.md)
- [@system.network (网络状态)](reference/apis/js-apis-system-network.md)
- [@system.notification (通知消息)](reference/apis/js-apis-system-notification.md)
......@@ -1269,9 +1278,16 @@
- [电话子系统错误码](reference/errorcodes/errorcode-telephony.md)
- 网络管理
- [上传下载错误码](reference/errorcodes/errorcode-request.md)
- [HTTP错误码](reference/errorcodes/errorcode-net-http.md)
- [Socket错误码](reference/errorcodes/errorcode-net-socket.md)
- [网络连接管理错误码](reference/errorcodes/errorcode-net-connection.md)
- [以太网连接错误码](reference/errorcodes/errorcode-net-ethernet.md)
- [网络共享错误码](reference/errorcodes/errorcode-net-sharing.md)
- [策略管理错误码](reference/errorcodes/errorcode-net-policy.md)
- 通信与连接
- [NFC错误码](reference/errorcodes/errorcode-nfc.md)
- [RPC错误码](reference/errorcodes/errorcode-rpc.md)
- [蓝牙服务子系统错误码](reference/errorcodes/errorcode-bluetoothManager.md)
- 系统基础能力
- [无障碍子系统错误码](reference/errorcodes/errorcode-accessibility.md)
- [Faultlogger错误码](reference/errorcodes/errorcode-faultlogger.md)
......@@ -1283,8 +1299,7 @@
- [时间时区服务错误码](reference/errorcodes/errorcode-time.md)
- [Webview错误码](reference/errorcodes/errorcode-webview.md)
- 帐号管理
- [Account错误码](reference/errorcodes/errorcode-account.md)
- [应用帐号错误码](reference/errorcodes/errorcode-app-account.md)
- [帐号管理错误码](reference/errorcodes/errorcode-account.md)
- 设备管理
- [耗电统计错误码](reference/errorcodes/errorcode-batteryStatistics.md)
- [屏幕亮度错误码](reference/errorcodes/errorcode-brightness.md)
......@@ -1305,7 +1320,7 @@
- [语言基础类库错误码](reference/errorcodes/errorcode-utils.md)
- 测试
- [uitest错误码](reference/errorcodes/errorcode-uitest.md)
- 接口参考(Native API)
- Native接口参考
- 模块
- [Native XComponent](reference/native-apis/_o_h___native_x_component.md)
- [HiLog](reference/native-apis/_hi_log.md)
......@@ -1413,6 +1428,7 @@
- [Native api中导出的EGL符号列表](reference/native-lib/third_party_opengl/egl-symbol.md)
- [Native api中导出的OpenGL ES 3.0符号列表](reference/native-lib/third_party_opengl/openglesv3-symbol.md)
- 常见问题
- [full-SDK编译指南](quick-start/full-sdk-compile-guide.md)
- [full-SDK替换指南](quick-start/full-sdk-switch-guide.md)
- [开发语言常见问题](faqs/faqs-language.md)
- [Ability框架开发常见问题](faqs/faqs-ability.md)
......
......@@ -67,7 +67,7 @@
- 中文用中文图,英文用英文图形。
- 图片建议根据内容命名,只用数字序列不利于后续图片的继承。
>![](public_sys-resources/icon-note.gif) **说明**:
>**说明**:
>引用方式:
>!\[\]\(./pic/pic-standard.png\)
......
......@@ -26,7 +26,7 @@
1. 在Gitee页面中,“Issue”页签中单击“新建Issue”,在标题栏中描述问题,在编辑框中添加详细问题描述。
2. 单击“创建”按钮,提交Issue,耐心等待文档团队成员确认您的问题。
>![](public_sys-resources/icon-note.gif) **说明**:
>**说明**:
>**如何反馈一个高质量的问题**?
>
>- 提供问题的清晰描述,描述具体缺失、过时、错误的内容或者需要改进的文字。
......
......@@ -347,7 +347,7 @@ OpenHarmony支持如下几种系统类型:
随版本编译,debug版本编译时会同步编译acts测试套件
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>acts测试套件编译中间件为静态库,最终链接到版本镜像中 。
......@@ -480,7 +480,7 @@ OpenHarmony支持如下几种系统类型:
随版本编译,debug版本编译时会同步编译acts测试套件
>![](public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>小型系统acts独立编译成可执行文件(bin格式), 在编译产物的suites\\acts目录下归档。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册