diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md index fa8abcfc87b2c4508c3f147098ac45825fc5c949..351ff72424bbe595466d4df872b42f73e5cdff91 100644 --- a/en/application-dev/reference/apis/Readme-EN.md +++ b/en/application-dev/reference/apis/Readme-EN.md @@ -88,8 +88,8 @@ - [@ohos.data.distributedData](js-apis-distributed-data.md) - [@ohos.data.distributedDataObject](js-apis-data-distributedobject.md) - [@ohos.data.rdb](js-apis-data-rdb.md) - - [@ohos.data.storage](js-apis-data-storage.md) - [@ohos.settings](js-apis-settings.md) + - [@ohos.data.storage](js-apis-data-storage.md) - data/rdb/[resultSet](js-apis-data-resultset.md) - File Management @@ -202,6 +202,7 @@ - [@ohos.bytrace](js-apis-bytrace.md) - [@system.app](js-apis-system-app.md) - [@system.battery](js-apis-system-battery.md) + - [@system.bluetooth](js-apis-system-bluetooth.md) - [@system.brightness](js-apis-system-brightness.md) - [@system.configuration](js-apis-system-configuration.md) - [@system.device](js-apis-system-device.md) @@ -210,6 +211,7 @@ - [@system.geolocation](js-apis-system-location.md) - [@system.mediaquery](js-apis-system-mediaquery.md) - [@system.network](js-apis-system-network.md) + - [@system.notification](js-apis-system-notification.md) - [@system.package](js-apis-system-package.md) - [@system.prompt](js-apis-system-prompt.md) - [@system.request](js-apis-system-request.md) diff --git a/en/application-dev/reference/apis/js-apis-system-notification.md b/en/application-dev/reference/apis/js-apis-system-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..3f3ef2cbbd9e3648cc6e72499fb052c40c856281 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-system-notification.md @@ -0,0 +1,68 @@ +# Notification + +> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.notification`](js-apis-notification.md). +> +> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + +## Modules to Import + + +``` +import notification from '@system.notification'; +``` + +## ActionResult + +**System capability**: SystemCapability.Notification.Notification + +| Name | Readable| Writable| Type | Mandatory| Description | +| ----------- | --- | ---- | ---------------------------------------------- | ---- | ------------------------- | +| bundleName | Yes | Yes | string | Yes | Name of the application bundle to which the notification will be redirected after being clicked. | +| abilityName | Yes | Yes | string | Yes | Name of the application ability to which the notification will be redirected after being clicked.| +| uri | Yes | Yes | string | No | URI of the page to be redirected to. | + + +## ShowNotificationOptions + +**System capability**: SystemCapability.Notification.Notification + +| Name | Readable| Writable| Type | Mandatory| Description | +| ------------- | --- | ---- | ---------------------------------------------- | ---- | ------------------------- | +| contentTitle | Yes | Yes | string | No | Notification title. | +| contentText | Yes | Yes | string | No | Notification content. | +| clickAction | Yes | Yes | ActionResult | No | Action triggered when the notification is clicked. | + + +## notification.show + +show(options?: ShowNotificationOptions): void + +Displays a notification. + +**System capability**: SystemCapability.Notification.Notification + +**Parameters** + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| options | ShowNotificationOptions | No| Notification title.| + +**Example** +```javascript +export default { + show() { + notification.show({ + contentTitle: 'title info', + contentText: 'text', + clickAction: { + bundleName: 'com.example.testapp', + abilityName: 'notificationDemo', + uri: '/path/to/notification', + }, + }); + }, +} +; +``` diff --git a/en/application-dev/reference/apis/js-apis-system-request.md b/en/application-dev/reference/apis/js-apis-system-request.md index 53fa3bf82253930056ccd2caa524f24d85598046..18b94b676942abb856fa9bd709c1898a6f98588d 100644 --- a/en/application-dev/reference/apis/js-apis-system-request.md +++ b/en/application-dev/reference/apis/js-apis-system-request.md @@ -53,7 +53,7 @@ Uploads files. | name | string | Yes | Name of the form element | | value | string | Yes | Value of the form element | -The following values will be returned when the files are successfully uploaded. +When the files are successfully uploaded, the following values will be returned. | Name | Type | Description | | -------- | -------- | -------- | @@ -61,6 +61,8 @@ The following values will be returned when the files are successfully uploaded. | data | string | Content returned by the server. The value type is determined by the type in the returned headers. | | headers | Object | Headers returned by the server. | +When the files fail to be uploaded, an HTTP status code is returned in **code** of **data**. + **Example** ``` diff --git a/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md b/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md index 5999c9de7c717a3ec1ad7bb06725a9a20795c5bf..847d8c0c9ac7be32c7f212022aec5ade6f507e82 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md +++ b/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md @@ -77,31 +77,31 @@ struct TabContentExample { Column() { Tabs({ barPosition: BarPosition.End, controller: this.controller }) { TabContent() { - Flex({justifyContent: FlexAlign.Center})) { + Flex({justifyContent: FlexAlign.Center}) { Text('Tab1').fontSize(32) } }.tabBar(this.TabBuilder(0)) TabContent() { - Flex({justifyContent: FlexAlign.Center})) { + Flex({justifyContent: FlexAlign.Center}) { Text('Tab2').fontSize(32) } }.tabBar(this.TabBuilder(1)) TabContent() { - Flex({justifyContent: FlexAlign.Center})) { + Flex({justifyContent: FlexAlign.Center}) { Text('Add').fontSize(32) } }.tabBar(this.AddBuilder()) TabContent() { - Flex({justifyContent: FlexAlign.Center})) { + Flex({justifyContent: FlexAlign.Center}) { Text('Tab3').fontSize(32) } }.tabBar(this.TabBuilder(3)) TabContent() { - Flex({justifyContent: FlexAlign.Center})) { + Flex({justifyContent: FlexAlign.Center}) { Text('Tab4').fontSize(32) } }.tabBar(this.TabBuilder(4))