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

!6019 【OpenHarmony开源贡献者计划2022】[英文]相关格式及表达问题

Merge pull request !6019 from king_he/0628-b
# Date Picker Dialog Box
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
You can display a date picker in a dialog box to allow users to select a date from the given range.
......@@ -13,18 +13,18 @@ None
show(options?: DatePickerDialogOptions)
Defines and displays a date picker dialog box.
Displays a date picker dialog box.
- options parameters
| Name| Type| Mandatory| Default Value| Description|
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| start | Date | No| Date('1970-1-1') | Start date of the picker.|
| end | Date | No| Date('2100-12-31') | End date of the picker.|
| selected | Date | No| Current system date| Date of the selected item.|
| lunar | boolean | No| false | Whether to display the lunar calendar.|
| onAccept | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult)) => void | No| - | Triggered when the OK button in the dialog box is clicked.|
| onCancel | () => void | No| - | Triggered when the Cancel button in the dialog box is clicked.|
| onChange | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult)) => void | No| - | Triggered when the selected item in the picker changes.|
| start | Date | No | Date('1970-1-1') | Start date of the picker. |
| end | Date | No | Date('2100-12-31') | End date of the picker. |
| selected | Date | No | Current system date | Date of the selected item. |
| lunar | boolean | No | false | Whether to display the lunar calendar. |
| onAccept | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult)) => void | No | - | Callback invoked when the OK button in the dialog box is clicked. |
| onCancel | () => void | No | - | Triggered when the Cancel button in the dialog box is clicked. |
| onChange | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult)) => void | No | - | Callback invoked when the selected item in the picker changes. |
## Example
......
# Menu
> **NOTE**<br>The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
> **NOTE**<br>
> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
## ContextMenu.close
|Method|Description|
|----|---|
|close(): void|Closes the menu bound to this component through [bindContextMenu](./ts-universal-attributes-menu.md#Atrributes) on a page.|
| API | Description |
| ---- | --- |
|close(): void| Closes the menu bound to this component through [bindContextMenu](./ts-universal-attributes-menu.md#Atrributes) on a page. |
- Example
```
......
# Text Picker Dialog Box
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
You can display a text picker in a dialog box to allow users to select text from the given range.
......@@ -16,20 +16,20 @@ show(options: TextPickerDialogOptions)
Shows a text picker in the given settings.
- TextPickerDialogOptions
| Name| Type| Mandatory| Default Value| Description|
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| range | string[] | Yes| - | Data selection range of the picker.|
| selected | number | No| First element| Index value of the selected item in the range.|
| defaultPickerItemHeight | number | No| - | Height of the default selected item in the picker.|
| onAccept | (value: TextPickerResult) => void | No| - | Triggered when the OK button in the dialog box is clicked.|
| onCancel | () => void | No| - | Triggered when the Cancel button in the dialog box is clicked.|
| onChange | (value: TextPickerResult) => void | No| - | Triggered when the selected item in the picker changes.|
| range | string[] | Yes | - | Data selection range of the picker. |
| selected | number | No | First element | Index value of the selected item in the range. |
| defaultPickerItemHeight | number | No | - | Height of the default selected item in the picker. |
| onAccept | (value: TextPickerResult) => void | No | - | Callback invoked when the OK button in the dialog box is clicked. |
| onCancel | () => void | No | - | Triggered when the Cancel button in the dialog box is clicked. |
| onChange | (value: TextPickerResult) => void | No | - | Callback invoked when the selected item in the picker changes. |
- TextPickerResult
| Name| Type| Description|
| Name | Type | Description |
| -------- | -------- | -------- |
| value | string | Text of the selected item.|
| index | number | Index value of the selected item in the range.|
| value | string | Text of the selected item. |
| index | number | Index value of the selected item in the range. |
## Example
......
# Time Picker Dialog Box
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
You can display a time picker in a dialog box to allow users to select a time from the given range, which is from 00:00 to 23:59 by default.
......@@ -13,16 +13,16 @@ None
show(options?: TimePickerDialogOptions)
Defines and displays a time picker dialog box.
Shows a time picker dialog box.
- options parameters
| Name| Type| Mandatory| Default Value| Description|
| -------- | -------- | -------- | -------- | -------- |
| selected | Date | No| Current system time| Time of the selected item.|
| useMilitaryTime | boolean | No| false | Whether to display time in 24-hour format.|
| onAccept | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult)) => void | No| - | Triggered when the OK button in the dialog box is clicked.|
| onCancel | () => void | No| - | Triggered when the Cancel button in the dialog box is clicked.|
| onChange | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult)) => void | No| - | Triggered when the selected item in the picker changes.|
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| selected | Date | No | Current system time | Time of the selected item. |
| useMilitaryTime | boolean | No | false | Whether to display time in 24-hour format. |
| onAccept | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult)) => void | No | - | Callback invoked when the OK button in the dialog box is clicked. |
| onCancel | () => void | No | - | Triggered when the Cancel button in the dialog box is clicked. |
| onChange | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult)) => void | No | - | Callback invoked when the selected item in the picker changes. |
## Example
......
# Page Transition
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This animation is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
Customize the page transition animations by configuring the page entrance and exit components in the global **pageTransition** method.
## APIs
| Name | Parameter | Description |
| -------- | -------- | -------- |
......@@ -15,7 +16,7 @@ Customize the page transition animations by configuring the page entrance and ex
- Animation parameters
| Name | Type | Default Value | Mandatory | Description |
| Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- |
| type | RouteType | - | No | If this parameter is not set, the reverse playback effect as pop switches to push is used. |
| duration | number | 1000 | No | Animation duration, in ms. |
......@@ -24,7 +25,7 @@ Customize the page transition animations by configuring the page entrance and ex
- RouteType enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| Pop | When page A jumps to page B, page A is Exit+Push, and page B is Enter+Push. |
| Push | When page B returns to page A, page A is Enter+Pop, and page B is Exit+Pop. |
......@@ -42,7 +43,7 @@ The **PageTransitionEnter** and **PageTransitionExit** components support the fo
| opacity | number | 1 | No | Opacity, which is the opacity value of the start point of entrance or the end point of exit. |
- SlideEffect enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| Left | When set to Enter, slides in from the left. When set to Exit, slides out to the left. |
| Right | When set to Enter, slides in from the right. When set to Exit, slides out to the right. |
......@@ -56,8 +57,8 @@ The PageTransitionEnter and PageTransitionExit components support the following
| Event | Description |
| -------- | -------- |
| onEnter(type: RouteType, progress: number) =&gt; void | The callback input parameter is the normalized progress of the current entrance animation. The value range is 0–1. |
| onExit(type: RouteType, progress: number) =&gt; void | The callback input parameter is the normalized progress of the current exit animation. The value range is 0–1. |
| onEnter(type: RouteType, progress: number) =&gt; void | Callback invoked when page entrance occurs. The input parameter is the normalized progress of the current entrance animation. The value range is 0–1. |
| onExit(type: RouteType, progress: number) =&gt; void | Callback invoked when page exit occurs. The input parameter is the normalized progress of the current exit animation. The value range is 0–1. |
## Example
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册