未验证 提交 17e5ebc4 编写于 作者: O openharmony_ci 提交者: Gitee

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

Merge pull request !5859 from king_he/0625-2
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The **&lt;GridContainer&gt;** component lays out components vertically. It is used only in the grid layout. The **<GridContainer\>** component lays out components vertically. It is used only in the grid layout.
## Required Permissions ## Required Permissions
...@@ -33,7 +33,7 @@ GridContainer(options?: { columns?: number | 'auto', sizeType?: SizeType, gutter ...@@ -33,7 +33,7 @@ GridContainer(options?: { columns?: number | 'auto', sizeType?: SizeType, gutter
- SizeType enums - SizeType enums
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| XS | Device of the minimum size. | | XS | Minimum-sized device. |
| SM | Small-sized device. | | SM | Small-sized device. |
| MD | Medium-sized device. | | MD | Medium-sized device. |
| LG | Large-sized device. | | LG | Large-sized device. |
...@@ -42,7 +42,7 @@ GridContainer(options?: { columns?: number | 'auto', sizeType?: SizeType, gutter ...@@ -42,7 +42,7 @@ GridContainer(options?: { columns?: number | 'auto', sizeType?: SizeType, gutter
## Attributes ## Attributes
Universal attributes and [attributes](ts-container-column.md#attributes) of the **&lt;Column&gt;** component are supported. Universal attributes and [attributes](ts-container-column.md#attributes) of the **<Column\>** component are supported.
## Events ## Events
......
...@@ -23,7 +23,7 @@ Refresh\(value: \{refreshing: boolean, offset?: Length, friction?: number\}\) ...@@ -23,7 +23,7 @@ Refresh\(value: \{refreshing: boolean, offset?: Length, friction?: number\}\)
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| refreshing | boolean | Yes| - | Whether the current component is being refreshed. | | refreshing | boolean | Yes| - | Whether the current component is being refreshed. |
| offset | Length | No| 16 | Distance to the top of the parent component from the **<Refresh\>** component that comes to rest after a successful pull-down gesture. | | offset | Length | No| 16 | Distance to the top of the parent component from the **<Refresh\>** component that comes to rest after a successful pull-down gesture. |
| friction | number | No| 62 | Coefficient of friction, which indicates the **<Refresh\>** component's sensitivity to the pull-down gesture. The value ranges from 0 to 100. <br/>- **0** indicates that the **<Refresh\>** component is not sensitive to the pull-down gesture. <br/>- **100** indicates that the **<Refresh\>** component is highly sensitive to the pull-down gesture. <br/>- A larger value indicates a more sensitive response of the **<Refresh\>** component to the pull-down gesture. | | friction | number | No| 62 | Coefficient of friction, which indicates the **<Refresh\>** component's sensitivity to the pull-down gesture. The value ranges from 0 to 100. <br/>- **0**: The **<Refresh\>** component is not sensitive to the pull-down gesture. <br/>- **100**: The **<Refresh\>** component is highly sensitive to the pull-down gesture. <br/>- Value greater than **100**: The **<Refresh\>** component is much more sensitive to the pull-down gesture. |
...@@ -32,8 +32,8 @@ Refresh\(value: \{refreshing: boolean, offset?: Length, friction?: number\}\) ...@@ -32,8 +32,8 @@ Refresh\(value: \{refreshing: boolean, offset?: Length, friction?: number\}\)
| Name| Description| | Name| Description|
| -------- | -------- | | -------- | -------- |
| onStateChange(callback: (state: RefreshStatus) => void)| Triggered when the refresh status changes. <br/>**state** indicates the refresh status.| | onStateChange(callback: (state: RefreshStatus) => void)| Triggered when the refresh status changes. <br/>**state** indicates the refresh status. |
| onRefreshing(callback: () => void)| Triggered when the component enters the refresh state.| | onRefreshing(callback: () => void)| Triggered when the component enters the refresh state. |
- RefreshStatus enums - RefreshStatus enums
......
...@@ -22,17 +22,17 @@ Supported ...@@ -22,17 +22,17 @@ Supported
Row(value:{space?: Length}) Row(value:{space?: Length})
- Parameters - Parameters
| Name| Type| Mandatory| Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| space | Length | No| 0 | Space between two adjacent child components in the horizontal layout. | | space | Length | No| 0 | Space between two adjacent child components in the horizontal layout. |
## Attributes ## Attributes
| Name| Type | Default Value | Description | | Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| alignItems | VerticalAlign | VerticalAlign.Center | Alignment mode of child components in the vertical direction. | | alignItems | VerticalAlign | VerticalAlign.Center | Alignment mode of the child components in the vertical direction. |
| justifyContent8+ | [FlexAlign](ts-container-flex.md) | FlexAlign.Start | Alignment mode of child components in the horizontal direction. | | justifyContent8+ | [FlexAlign](ts-container-flex.md) | FlexAlign.Start | Alignment mode of the child components in the horizontal direction. |
- VerticalAlign enums - VerticalAlign enums
| Name | Description | | Name | Description |
......
...@@ -27,7 +27,7 @@ RowSplit() ...@@ -27,7 +27,7 @@ RowSplit()
| Name | Type | Description | | Name | Type | Description |
| -------- | -------- | -------- | | -------- | -------- | -------- |
| resizeable | boolean | Whether the divider can be dragged. The default value is **false**. | | resizeable | boolean | Whether the divider is draggable. The default value is **false**. |
> **NOTE**<br> > **NOTE**<br>
> Similar to **<RowSplit\>**, the divider of **<RowSplit\>** can be dragged to a position that just fully holds a component. > Similar to **<RowSplit\>**, the divider of **<RowSplit\>** can be dragged to a position that just fully holds a component.
......
# Scroll # Scroll
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The **&lt;Scroll&gt;** component scrolls the content when the layout size of a component exceeds the viewport of its parent component. The **<Scroll\>** component scrolls the content when the layout size of a component exceeds the viewport of its parent component.
## Required Permissions ## Required Permissions
...@@ -25,7 +25,7 @@ Scroll(scroller?: Scroller) ...@@ -25,7 +25,7 @@ Scroll(scroller?: Scroller)
## Attributes ## Attributes
| Name | Type | Default Value | Description | | Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| scrollable | ScrollDirection | ScrollDirection.Vertical | Scroll method. | | scrollable | ScrollDirection | ScrollDirection.Vertical | Scroll method. |
| scrollBar | [BarState](ts-appendix-enums.md#barstate-enums) | Auto | Scroll bar status. | | scrollBar | [BarState](ts-appendix-enums.md#barstate-enums) | Auto | Scroll bar status. |
...@@ -33,7 +33,7 @@ Scroll(scroller?: Scroller) ...@@ -33,7 +33,7 @@ Scroll(scroller?: Scroller)
| scrollBarWidth | Length | - | Width of the scrollbar. | | scrollBarWidth | Length | - | Width of the scrollbar. |
- ScrollDirection - ScrollDirection
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| Horizontal | Only horizontal scrolling is supported. | | Horizontal | Only horizontal scrolling is supported. |
| Vertical | Only vertical scrolling is supported. | | Vertical | Only vertical scrolling is supported. |
...@@ -42,7 +42,7 @@ Scroll(scroller?: Scroller) ...@@ -42,7 +42,7 @@ Scroll(scroller?: Scroller)
## Scroller ## Scroller
Controller of the scrollable container component. You can bind this component to the container component and use it to control the scrolling of the container component. Currently, this component can be bound to the **&lt;List&gt;** and **&lt;Scroll&gt;** components. Controller of the scrollable container component. You can bind this component to the container component and use it to control the scrolling of the container component. Currently, this component can be bound to the **<List\>** and **<Scroll\>** components.
### Objects to Import ### Objects to Import
...@@ -78,7 +78,7 @@ Scrolls to the edge of the container. ...@@ -78,7 +78,7 @@ Scrolls to the edge of the container.
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| value | Edge | Yes | - | Edge position to scroll to. | | value | Edge | Yes | - | Edge position to scroll to. |
...@@ -90,7 +90,7 @@ scrollPage(value: { next: boolean, direction?: Axis }): void ...@@ -90,7 +90,7 @@ scrollPage(value: { next: boolean, direction?: Axis }): void
Scrolls to the next or previous page. Scrolls to the next or previous page.
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| next | boolean | Yes | - | Whether to turn to the next page. The value **true** means to scroll to the next page, and the value **false** means to scroll to the previous page. | | next | boolean | Yes | - | Whether to turn to the next page. The value **true** means to scroll to the next page, and the value **false** means to scroll to the previous page. |
...@@ -104,9 +104,9 @@ Obtains the scrolling offset. ...@@ -104,9 +104,9 @@ Obtains the scrolling offset.
- Return value - Return value
| Type | Description | | Type | Description |
| -------- | -------- | | -------- | -------- |
| {<br/>xOffset: number,<br/>yOffset: number<br/>} | **xOffset**: horizontal scrolling offset.<br/>**yOffset**: vertical scrolling offset. | | {<br/>xOffset: number,<br/>yOffset: number<br/>} | - **xOffset**: horizontal scrolling offset.<br/>- **yOffset**: vertical scrolling offset. |
### scroller.scrollToIndex ### scroller.scrollToIndex
...@@ -117,12 +117,12 @@ scroller.scrollToIndex(value: number): void ...@@ -117,12 +117,12 @@ scroller.scrollToIndex(value: number): void
Scrolls to the specified index. Scrolls to the specified index.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> Only the **&lt;List&gt;** component is supported. > Only the **<List\>** component is supported.
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| value | number | Yes | - | Index of the item to be scrolled to in the list. | | value | number | Yes | - | Index of the item to be scrolled to in the list. |
...@@ -131,8 +131,8 @@ Scrolls to the specified index. ...@@ -131,8 +131,8 @@ Scrolls to the specified index.
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| onScroll(xOffset: number, yOffset: number) =&gt; void | Invoked to return the horizontal and vertical offsets during scrolling when the specified scroll event occurs. | | onScroll(xOffset: number, yOffset: number) =&gt; void | Invoked to return the horizontal and vertical scrolling offsets when the specified scroll event occurs. |
| onScrollEdge(side: Edge) =&gt; void | Callback for the event of scrolling to the edge. | | onScrollEdge(side: Edge) =&gt; void | Invoked when an item is scrolled to the edge. |
| onScrollEnd() =&gt; void | Invoked when scrolling stops. | | onScrollEnd() =&gt; void | Invoked when scrolling stops. |
......
# Stack # Stack
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The **&lt;Stack&gt;** component provides a stack container where child components are successively stacked and the latter one overwrites the previous one. The **<Stack\>** component provides a stack container where child components are successively stacked and the latter one overwrites the previous one.
## Required Permissions ## Required Permissions
...@@ -23,7 +23,7 @@ None ...@@ -23,7 +23,7 @@ None
Stack(value:{alignContent?: Alignment}) Stack(value:{alignContent?: Alignment})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| alignContent | [Alignment](ts-appendix-enums.md#alignment-enums) | No | Center | Alignment of child components in the container. | | alignContent | [Alignment](ts-appendix-enums.md#alignment-enums) | No | Center | Alignment of child components in the container. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册