提交 8ff21d5c 编写于 作者: E ester.zhou

update js-apis-notification.md

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 2c7230b4
# Notification
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -2900,6 +2900,7 @@ Notification.subscribe(subscriber, subscribeCallback);
| title | Yes | Yes | string | Yes | Button title. |
| wantAgent | Yes | Yes | WantAgent | Yes | **WantAgent** of the button.|
| extras | Yes | Yes | { [key: string]: any } | No | Extra information of the button. |
| userInput | Yes | Yes | [NotificationUserInput](#notificationuserinput8) | No | User input. |
## NotificationBasicContent
......
......@@ -7,7 +7,7 @@
## Modules to Import
```
```js
import request from '@ohos.request';
```
......@@ -84,8 +84,10 @@ Uploads files. This API uses a promise to return the result.
```js
let file1 = { filename: "test", name: "test", uri: "internal://cache/test.jpg", type: "jpg" };
let data = { name: "name123", value: "123" };
let header = { key1: value1, key2: value2 };
let uploadTask;
request.upload({ url: 'https://patch', files: [file1] }).then((data) => {
request.upload({ url: 'https://patch', header: header, method: "POST", files: [file1], data: [data] }).then((data) => {
uploadTask = data;
}).catch((err) => {
console.error('Failed to request the upload. Cause: ' + JSON.stringify(err));
......@@ -114,8 +116,10 @@ Uploads files. This API uses an asynchronous callback to return the result.
```js
let file1 = { filename: "test", name: "test", uri: "internal://cache/test.jpg", type: "jpg" };
let data = { name: "name123", value: "123" };
let header = { key1: value1, key2: value2 };
let uploadTask;
request.upload({ url: 'https://patch', files: [file1] }, (err, data) => {
request.upload({ url: 'https://patch', header: header, method: "POST", files: [file1], data: [data] }, (err, data) => {
if (err) {
console.error('Failed to request the upload. Cause: ' + JSON.stringify(err));
return;
......
......@@ -31,7 +31,8 @@ Implements initialization for the interpolation curve, which is used to create a
| -------- | -------- | -------- | -------- | -------- |
| curve | Curve | No | Linear | Curve object. |
- Return value<br>
- Return value
Curve object.
......@@ -47,7 +48,7 @@ Constructs a step curve object.
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| count | number | Yes | - | Number of steps. Must be a positive integer. |
| end | boolean | No | true | Step change at the start or end point of each interval. Defaults to **true**, indicating that the step change occurs at the end point. |
| end | boolean | Yes | true | Step change at the start or end point of each interval. Defaults to **true**, indicating that the step change occurs at the end point. |
- Return value
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册