提交 12467202 编写于 作者: S sienna1128

update docs

Signed-off-by: Nsienna1128 <lixiaoyan45@huawei.com>
上级 b0ea0a2a
......@@ -21,7 +21,7 @@ Gauge(options:{value: number, min?: number, max?: number})
| 参数名 | 参数类型 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- |
| value | number | 是 | 数据图表的值,图中指针指向位置。用于组件创建时数据图表值的预置。 |
| value | number | 是 | 量规图的当前数据值,即图中指针指向位置。用于组件创建时量规图初始值的预置。 |
| min | number | 否 | 当前数据段最小值。<br/>默认值:0 |
| max | number | 否 | 当前数据段最大值。<br/>默认值:100 |
......@@ -31,11 +31,11 @@ Gauge(options:{value: number, min?: number, max?: number})
| 名称 | 参数类型 | 描述 |
| -------- | -------- | -------- |
| value | number | 设置当前数据图表的值,用于组件创建完成后数据图表值的设置<br/>默认值:0 |
| value | number | 设置量规图的数据值,可用于动态修改量规图的数据值<br/>默认值:0 |
| startAngle | number | 设置起始角度位置,时钟0点为0度,顺时针方向为正角度。<br/>默认值:0 |
| endAngle | number | 设置终止角度位置,时钟0点为0度,顺时针方向为正角度。<br/>默认值:360 |
| colors | Array&lt;[ColorStop](#colorstop)&gt; | 设置图表的颜色,支持分段颜色设置。 |
| strokeWidth | Length | 设置环形图表的环形厚度。 |
| colors | Array&lt;[ColorStop](#colorstop)&gt; | 设置量规图的颜色,支持分段颜色设置。 |
| strokeWidth | Length | 设置环形量规图的环形厚度。 |
## ColorStop
......
......@@ -66,7 +66,7 @@ struct BlurEffectsExample {
![textblur](figures/textblur.png)
### 示例2
图片效果属性的用法,阴影,灰度,高光,饱和度,对比度,图像反转,叠色,色相旋转等。
设置图片的效果,包括阴影,灰度,高光,饱和度,对比度,图像反转,叠色,色相旋转等。
```ts
// xxx.ets
@Entry
......
......@@ -45,8 +45,8 @@
@Entry
@Component
struct PopupExample {
@State handlePopup: boolean = false
@State customPopup: boolean = false
@State handlePopup: boolean = false;
@State customPopup: boolean = false;
// popup构造器定义弹框内容
@Builder popupBuilder() {
......
# 触摸热区设置
适用于支持通用点击事件、通用触摸事件、通用手势处理的组件的触摸热区设置
适用于支持通用点击事件、通用触摸事件、通用手势处理的组件。
> **说明:**
......@@ -19,10 +19,10 @@
## Rectangle对象说明
| 名称 | 类型 | 必填 | 描述 |
| ------ | ----------------------------- | -----| -------------------------------- |
| x | [Length](ts-types.md#length) | 否 | 触摸点相对于组件左边沿的x轴坐标。<br/>默认值:0vp |
| y | [Length](ts-types.md#length) | 否 | 触摸点相对于组件上边沿的y轴坐标。<br/>默认值:0vp |
| width | [Length](ts-types.md#length) | 否 | 触摸热区的宽度。<br/>默认值:100% |
| height | [Length](ts-types.md#length) | 否 | 触摸热区的高度。<br/>默认值:100% |
| x | [Length](ts-types.md#length) | 否 | 触摸点相对于组件左上角的x轴坐标。<br/>默认值:0vp |
| y | [Length](ts-types.md#length) | 否 | 触摸点相对于组件左上角的y轴坐标。<br/>默认值:0vp |
| width | [Length](ts-types.md#length) | 否 | 触摸热区的宽度。<br/>默认值:'100%' |
| height | [Length](ts-types.md#length) | 否 | 触摸热区的高度。<br/>默认值:'100%' |
> **说明:**
>
......@@ -30,7 +30,7 @@
>
> width和height只能设置正值百分比。width:'100%'表示热区宽度设置为该组件本身的宽度。比如组件本身宽度是100vp,那么'100%'表示热区宽度也为100vp。height:'100%'表示热区高度设置为该组件本身的高度。
>
> 百分比相对于组件本身宽高计算。
> 百分比相对于组件自身宽高进行计算。
## 示例
......@@ -40,7 +40,7 @@
@Entry
@Component
struct TouchTargetExample {
@State text: string = ""
@State text: string = "";
build() {
Column({ space: 20 }) {
......@@ -49,7 +49,7 @@ struct TouchTargetExample {
Button("button1")
.responseRegion({ x: 0, y: 0, width: '50%', height: '100%' })
.onClick(() => {
this.text = 'button1 clicked'
this.text = 'button1 clicked';
})
// 热区宽度为按钮的一半,且右移一个按钮宽度,点击button2右侧左边,点击事件生效
......@@ -57,14 +57,14 @@ struct TouchTargetExample {
Button("button2")
.responseRegion({ x: '100%', y: 0, width: '50%', height: '100%' })
.onClick(() => {
this.text = 'button2 clicked'
this.text = 'button2 clicked';
})
// 热区大小为整个按钮,且下移一个按钮高度,点击button3下方按钮大小区域,点击事件生效
Text("{x:0,y:'100%',width:'100%',height:'100%'}")
Button("button3")
.responseRegion({ x: 0, y: '100%', width: '100%', height: '100%' })
.onClick(() => {
this.text = 'button3 clicked'
this.text = 'button3 clicked';
})
Text(this.text).margin({ top: 50 })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册