提交 810ec1a2 编写于 作者: E ester.zhou

Update docs (21171)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 085001be
......@@ -169,3 +169,41 @@ struct SwipeGestureExample {
```
![ifButton](figures/ifButton.gif)
### Example 3
```ts
// xxx.ets
@Entry
@Component
struct buttonTestDemo {
@State txt: string = 'overflowTextOverlengthTextOverflow.Clip';
@State widthShortSize: number = 200;
build() {
Row() {
Column() {
Button(this.txt)
.width(this.widthShortSize)
.height(100)
.labelStyle({ overflow: TextOverflow.Clip,
maxLines: 1,
minFontSize: 20,
maxFontSize: 20,
font: {
size: 20,
weight: FontWeight.Bolder,
family: 'cursive',
style: FontStyle.Italic
}
})
.fontSize(40)
}
.width('100%')
}
.height('100%')
}
}
```
![image-20230711171138661](figures/imageButtonLabelStyle.png)
......@@ -68,7 +68,7 @@ struct GaugeExample {
// Set the value parameter to 75 and the value attribute to 25. The attribute setting is used.
Gauge({ value: 75 })
.value(25) // If both the attribute and parameter are set, the parameter setting is used.
.value(25) // If both the attribute and parameter are set, the attribute setting is used.
.width(200).height(200)
.colors([[0x317AF7, 1], [0x5BA854, 1], [0xE08C3A, 1], [0x9C554B, 1]])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册