提交 f1df666c 编写于 作者: G gmy

update docs

Signed-off-by: Ngmy <guanmingyue@h-partners.com>
上级 19c412a8
...@@ -24,16 +24,17 @@ Blank(min?: Length) ...@@ -24,16 +24,17 @@ Blank(min?: Length)
- 参数 - 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| min | Length | 否 | 0 | 空白填充组件在容器主轴上的最小大小。 | | min | [Length](../../ui/ts-types.md) | 否 | 0 | 空白填充组件在容器主轴上的最小大小。 |
## 属性 ## 属性
| 名称 | 参数类型 | 默认值 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| color | [ResourceColor](../../ui/ts-types.md) | 0x00000000 | 设置空白填充的填充颜色。 | | color | [ResourceColor](../../ui/ts-types.md) | 0xffffff | 设置空白填充的填充颜色。 |
> **说明:** > **说明:**
>
> - 不支持通用属性方法。 > - 不支持通用属性方法。
......
...@@ -43,11 +43,11 @@ Image(src: string | PixelMap | Resource) ...@@ -43,11 +43,11 @@ Image(src: string | PixelMap | Resource)
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
| 名称 | 参数类型 | 默认值 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| --------------------- | ---------------------------------------- | ------------------------ | ---------------------------------------- | | --------------------- | ------------------------------------------------------- | ------------------------ | ------------------------------------------------------------ |
| alt | string \| [Resource](../../ui/ts-types.md#resource类型) | - | 加载时显示的占位图,支持本地图片和网络图片。 | | alt | string \| [Resource](../../ui/ts-types.md#resource类型) | - | 加载时显示的占位图,支持本地图片和网络图片。 |
| objectFit | [ImageFit](#imagefit枚举说明) | ImageFit.Cover | 设置图片的缩放类型。 | | objectFit | ImageFit | ImageFit.Cover | 设置图片的缩放类型。 |
| objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | 设置图片的重复样式。<br/>> **说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。 | | objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | 设置图片的重复样式。<br/>> **说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。 |
| interpolation | [ImageInterpolation](#imageinterpolation) | ImageInterpolation.None | 设置图片的插值效果,仅针对图片放大插值。<br/>>&nbsp;**说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。<br/>>&nbsp;-&nbsp;PixelMap资源不支持该属性。 | | interpolation | [ImageInterpolation](#imageinterpolation) | ImageInterpolation.None | 设置图片的插值效果,即减轻低清晰度图片在放大显示的时候出现的锯齿问题,仅针对图片放大插值。<br/>>&nbsp;**说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。<br/>>&nbsp;-&nbsp;PixelMap资源不支持该属性。 |
| renderMode | [ImageRenderMode](#imagerendermode) | ImageRenderMode.Original | 设置图片渲染的模式。<br/>>&nbsp;**说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。 | | renderMode | [ImageRenderMode](#imagerendermode) | ImageRenderMode.Original | 设置图片渲染的模式。<br/>>&nbsp;**说明:**<br/>>&nbsp;-&nbsp;svg类型图源不支持该属性。 |
| sourceSize | {<br/>width:&nbsp;number,<br/>height:&nbsp;number<br/>} | - | 设置图片裁剪尺寸,将原始图片解码成pixelMap,指定尺寸的图片,单位为px。<br/>>&nbsp;**说明:**<br/>>&nbsp;PixelMap资源不支持该属性。 | | sourceSize | {<br/>width:&nbsp;number,<br/>height:&nbsp;number<br/>} | - | 设置图片裁剪尺寸,将原始图片解码成pixelMap,指定尺寸的图片,单位为px。<br/>>&nbsp;**说明:**<br/>>&nbsp;PixelMap资源不支持该属性。 |
| syncLoad<sup>8+</sup> | boolean | false | 设置是否同步加载图片,默认是异步加载。同步加载时阻塞UI线程,不会显示占位图。 | | syncLoad<sup>8+</sup> | boolean | false | 设置是否同步加载图片,默认是异步加载。同步加载时阻塞UI线程,不会显示占位图。 |
......
...@@ -42,6 +42,7 @@ TextInput(value?:{placeholder?: string | Resource, text?: string | Resource, con ...@@ -42,6 +42,7 @@ TextInput(value?:{placeholder?: string | Resource, text?: string | Resource, con
| maxLength | number | - | 设置文本的最大输入字符数。 | | maxLength | number | - | 设置文本的最大输入字符数。 |
| inputFilter<sup>8+</sup> | {<br/>value:&nbsp;[ResourceStr](../../ui/ts-types.md)<sup>8+</sup>,<br/>error?:&nbsp;(value:&nbsp;string)<br/>} | - | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。<br/>-&nbsp;value:设置正则表达式。<br/>-&nbsp;error:正则匹配失败时,返回被忽略的内容。 | | inputFilter<sup>8+</sup> | {<br/>value:&nbsp;[ResourceStr](../../ui/ts-types.md)<sup>8+</sup>,<br/>error?:&nbsp;(value:&nbsp;string)<br/>} | - | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。<br/>-&nbsp;value:设置正则表达式。<br/>-&nbsp;error:正则匹配失败时,返回被忽略的内容。 |
| copyOption<sup>9+</sup> | boolean\|[CopyOption](ts-basic-components-text.md) | true | 设置文本是否可复制。 | | copyOption<sup>9+</sup> | boolean\|[CopyOption](ts-basic-components-text.md) | true | 设置文本是否可复制。 |
| showPasswordIcon<sup>9+</sup> | boolean | true | 密码输入模式时,密码框末尾的图标是否显示。 |
- EnterKeyType枚举说明 - EnterKeyType枚举说明
| 名称 | 描述 | | 名称 | 描述 |
......
...@@ -90,7 +90,7 @@ struct BadgeExample { ...@@ -90,7 +90,7 @@ struct BadgeExample {
Badge({ Badge({
value: '', value: '',
position: 1, position: BadgePosition.Right,
style: { badgeSize: 6, badgeColor: Color.Red } style: { badgeSize: 6, badgeColor: Color.Red }
}) { }) {
Text('message') Text('message')
......
...@@ -15,6 +15,20 @@ ...@@ -15,6 +15,20 @@
# 接口
Path(value?: { width?: number | string; height?: number | string; commands?: string })
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | ---- | ------ | -------------------- |
| width | Length | 否 | 0 | 路径所在矩形的宽度 |
| height | Length | 否 | 0 | 路径所在矩形的高度 |
| commands | string | 是 | ‘ ’ | 路径绘制的命令字符串 |
## 属性 ## 属性
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
......
...@@ -68,10 +68,13 @@ struct GridContainerExample1 { ...@@ -68,10 +68,13 @@ struct GridContainerExample1 {
``` ```
**图1** 设备宽度为SM **图1** 设备宽度为SM
![zh-cn_image_0000001174582872](figures/zh-cn_image_0000001174582872.png) ![zh-cn_image_0000001174582872](figures/zh-cn_image_0000001174582872.png)
**图2** 设备宽度为MD **图2** 设备宽度为MD
![zh-cn_image_0000001219744207](figures/zh-cn_image_0000001219744207.png) ![zh-cn_image_0000001219744207](figures/zh-cn_image_0000001219744207.png)
**图3** 设备宽度为LG **图3** 设备宽度为LG
![zh-cn_image_0000001219982727](figures/zh-cn_image_0000001219982727.png) ![zh-cn_image_0000001219982727](figures/zh-cn_image_0000001219982727.png)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册