diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/imageButtonLabelStyle.png b/zh-cn/application-dev/reference/arkui-ts/figures/imageButtonLabelStyle.png new file mode 100644 index 0000000000000000000000000000000000000000..1a0f0d9cb7ec8cee7f6f01cc7e1b409f54e129ef Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/imageButtonLabelStyle.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md index b5c9301887044d2bd3c4d709e12f02efefe4b1d3..c56c0a02fe2e8189cf473e3ca07ac7d4c7dcadcf 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md @@ -168,4 +168,42 @@ struct SwipeGestureExample { } ``` -![ifButton](figures/ifButton.gif) \ No newline at end of file +![ifButton](figures/ifButton.gif) + +### 示例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) \ No newline at end of file