未验证 提交 52f3b879 编写于 作者: O openharmony_ci 提交者: Gitee

!8924 翻译完成 7379

Merge pull request !8924 from ester.zhou/TR-7379
......@@ -26,14 +26,14 @@ Blank(min?: Length)
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| min | Length | No | 0 | Minimum size of the **<Blank>** component in the container along the main axis. |
| min | [Length](../../ui/ts-types.md) | No | 0 | Minimum size of the **<Blank>** component in the container along the main axis. |
## Attributes
| Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- |
| color | [ResourceColor](../../ui/ts-types.md) | 0x00000000 | Color to fill the blank. |
| color | [ResourceColor](../../ui/ts-types.md) | 0xffffff | Color to fill the blank. |
> **NOTE**
>
......
# Path
> **NOTE**<br>
> **NOTE**
>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
......@@ -15,16 +16,16 @@ None
## Child Components
None
Not supported
## Attributes
| Name | Type | Default Value | Mandatory | Description |
| Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the path is located. |
| height | Length | 0 | No | Height of the rectangle where the path is located. |
| commands | string | '' | Yes | Commands for drawing the path. |
| width | Length | 0 | No | Width of the rectangle where the path is located. |
| height | Length | 0 | No | Height of the rectangle where the path is located. |
| commands | string | '' | Yes | Commands for drawing the path. |
The supported commands are as follows:
......@@ -56,7 +57,7 @@ For example, the command **M0 20 L50 50 L50 100 Z** defines a path that starts f
## Example
```ts
@Entry
@Component
......
# Grid
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**
>
> - This attribute is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
>
>
> - The column width and column gap in the grid layout are determined by the nearest parent component **GridContainer**. The component tree that uses grid attributes must contain one **GridContainer** or more.
......@@ -15,17 +16,18 @@ None
## Attributes
| Name | Type | Default Value | Description |
| Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- |
| useSizeType | {<br/>xs?: number \| { span: number, offset: number },<br/>sm?: number \| { span: number, offset: number },<br/>md?: number \| { span: number, offset: number },<br/>lg?: number \| { span: number, offset: number }<br/>} | - | Number of occupied columns and offset columns for a specific device width type. **span** indicates the number of occupied columns, and **offset** indicates the number of offset columns.<br/>If the value is of the number type, only the number of columns can be set. If the value is in the format of {"span": 1, "offset": 0}, both the number of occupied columns and the number of offset columns need to be set.<br/>- **xs** indicates that the device width type is **SizeType.XS**.<br/>- **sm** indicates that the device width type is **SizeType.SM**.<br/>- **md** indicates that the device width type is **SizeType.MD**.<br/>- **lg** indicates that the device width type is **SizeType.LG**. |
| gridSpan | number | 1 | Default number of occupied columns, that is, the number of occupied columns when **span** in **useSizeType** is not set.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>> If the **span** attribute is set, the component width is determined by the grid layout. |
| gridOffset | number | 0 | Default number of offset columns, that is, the number of offset columns in the start direction of the parent component (which is also the nth column that the component is in) when **offset** in **useSizeType** is not set.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>> 1. After this attribute is set, the horizontal layout of the current component does not follow the original layout of the parent component. Instead, it offsets along the start direction of the parent component.<br/>> <br/>> 2. Offset = (Column width + Gap) x Number of columns<br/>> <br/>> 3. After this attribute is set, sibling components will be arranged relatively to this component, as in the relative layout. |
| useSizeType | {<br/>xs?: number \| { span: number, offset: number },<br/>sm?: number \| { span: number, offset: number },<br/>md?: number \| { span: number, offset: number },<br/>lg?: number \| { span: number, offset: number }<br/>} | - | Number of occupied columns and offset columns for a specific device width type. **span** indicates the number of occupied columns, and **offset** indicates the number of offset columns.<br/>If the value is of the number type, only the number of columns can be set. If the value is in the format of {"span": 1, "offset": 0}, both the number of occupied columns and the number of offset columns need to be set.<br/>- **xs** indicates that the device width type is **SizeType.XS**.<br/>- **sm** indicates that the device width type is **SizeType.SM**.<br/>- **md** indicates that the device width type is **SizeType.MD**.<br/>- **lg** indicates that the device width type is **SizeType.LG**. |
| gridSpan | number | 1 | Default number of occupied columns, that is, the number of occupied columns when **span** in **useSizeType** is not set.<br/>> **NOTE**<br/>> If the **span** attribute is set, the component width is determined by the grid layout. |
| gridOffset | number | 0 | Default number of offset columns, that is, the number of offset columns in the start direction of the parent component (which is also the nth column that the component is in) when **offset** in **useSizeType** is not set.<br/>> **NOTE**<br/>> 1. After this attribute is set, the horizontal layout of the current component does not follow the original layout of the parent component. Instead, it offsets along the start direction of the parent component.<br/>> 2. Offset = (Column width + Gap) x Number of columns<br/>> 3. After this attribute is set, sibling components will be arranged relatively to this component, as in the relative layout. |
## Example
```
```ts
// xxx.ets
@Entry
@Component
struct GridContainerExample1 {
......@@ -68,11 +70,14 @@ struct GridContainerExample1 {
}
```
**Figure1** Device width type SM
**Figure 1** Device width type SM
![en-us_image_0000001256858405](figures/en-us_image_0000001256858405.png)
**Figure2** Device width type MD
**Figure 2** Device width type MD
![en-us_image_0000001257058415](figures/en-us_image_0000001257058415.png)
**Figure3** Device width type LG
**Figure 3** Device width type LG
![en-us_image_0000001212378416](figures/en-us_image_0000001212378416.png)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册