提交 073cbb37 编写于 作者: E ester.zhou

Update docs (14304)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 f8a4d8cb
......@@ -34,11 +34,11 @@ None
| Name| Description|
| -------- | -------- |
| onFinish(callback: () =&gt; void) | Invoked when the **nextLabel** of the last **\<StepperItem>** in the **\<Stepper>** is clicked.|
| onFinish(callback: () =&gt; void) | Invoked when the **nextLabel** of the last **\<StepperItem>** in the **\<Stepper>** is clicked and the **ItemState** attribute is set to **Normal**.|
| onSkip(callback: () =&gt; void) | Invoked when the current **\<StepperItem>** is **ItemState.Skip** and the **nextLabel** is clicked.|
| onChange(callback: (prevIndex?: number, index?: number) =&gt; void) | Invoked when the user switches to the previous or next step.<br>- **prevIndex**: index of the step page before the switching.<br>- **index**: index of the step page after the switching, that is, index of the previous or next page.|
| onNext(callback: (index?: number, pendingIndex?: number) =&gt; void) | Invoked when a user switches to the next step.<br>- **index**: index of the current step page.<br>- **pendingIndex**: index of the next page.|
| onPrevious(callback: (index?: number, pendingIndex?: number) =&gt; void) | Invoked when a user switches to the previous step.<br>- **index**: index of the current step page.<br>- **pendingIndex**: index of the previous page.|
| onChange(callback: (prevIndex?: number, index?: number) =&gt; void) | Invoked when the **prevLabel** of the current **\<StepperItem>** is clicked to switch to the previous step page; or when the **nextLabel** of the current (not the last) **\<StepperItem>** is clicked to switch to the next step page and the **ItemState** attribute is set to **Normal**.<br>- **prevIndex**: index of the step page before the switching.<br>- **index**: index of the step page after the switching, that is, index of the previous or next step page.|
| onNext(callback: (index?: number, pendingIndex?: number) =&gt; void) | Invoked when the **nextLabel** of the current (not the last) **\<StepperItem>** is clicked and the **ItemState** attribute is set to **Normal**.<br>- **index**: index of the current step page.<br>- **pendingIndex**: index of the next step page.|
| onPrevious(callback: (index?: number, pendingIndex?: number) =&gt; void) | Invoked when the **prevLabel** of the current **\<StepperItem>** is clicked to switch to the previous step page.<br>- **index**: index of the current step page.<br>- **pendingIndex**: index of the previous step page.|
## Example
......@@ -122,7 +122,6 @@ struct StepperExample {
.itemTextStyle()
}.itemStyle()
}
.nextLabel('Finish')
}
.backgroundColor('#F1F3F5')
.onFinish(() => {
......
......@@ -22,7 +22,7 @@ StepperItem()
| Name| Type| Description|
| -------- | -------- | -------- |
| prevLabel | string | Text label of the button on the left. When the **\<Stepper>** contains more than one page, the default value for all pages except the first page is **Back**.|
| prevLabel | string | Text label of the button on the left, which is not displayed on the first page. When the **\<Stepper>** contains more than one page, the default value for all pages except the first page is **Back**.|
| nextLabel | string | Text label of the button on the right. The default value is **Start** for the last page and **Next** for the other pages.|
| status | ItemState | Display status of **nextLabel** in the stepper.<br>Default value: **ItemState.Normal**|
......@@ -31,9 +31,9 @@ StepperItem()
| Name | Value | Description|
| -------- | -------- |-------- |
| Normal | 0 |The button on the right is clickable and can navigate users to the next **\<StepperItem>** when it is clicked.|
| Disabled | 1 |The button on the right is grayed out and unavailable.|
| Disabled | 1 |The button on the right is disabled.|
| Waiting | 2 | The button on the right is not displayed, and a progress bar is displayed instead.|
| Skip | 3 |The button on the right reads "Skip". You can define the processing logic for this state in the **onSkip** callback of the stepper.|
| Skip | 3 |The button on the right reads "Skip" by default. You can define the processing logic for this state in the **onSkip** callback of the stepper.|
## Example
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册