diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/richText.png b/zh-cn/application-dev/reference/arkui-ts/figures/richText.png index 1520a854a9baed9fcc4e50e989bbfb4e83acf487..5d9db6f68aab7954ae1ac31e51f0b1abff7ebd76 100644 Binary files a/zh-cn/application-dev/reference/arkui-ts/figures/richText.png and b/zh-cn/application-dev/reference/arkui-ts/figures/richText.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md index 7b823400d555d9ed8e11b215ccbc0994754e7f8d..f4186ab265e98af579e3d0da3e72144d971158ba 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md @@ -31,6 +31,10 @@ RichText(content:string) | onStart(callback: () => void) | 加载网页时触发。 | | onComplete(callback: () => void) | 网页加载结束时触发。 | +## 属性 + +只支持[通用属性](ts-universal-attributes-size.md)中width,height,size,layoutWeight四个属性。由于padding,margin,constraintSize属性使用时与通用属性描述不符,暂不支持。 + ## 支持标签 | 名称 | 描述 | 示例 | @@ -78,6 +82,29 @@ struct RichTextExample { .onComplete(() => { console.info('RichText onComplete'); }) + .width(500) + .height(400) + .backgroundColor(0XBDDB69) + RichText('layoutWeight(1)') + .onStart(() => { + console.info('RichText onStart'); + }) + .onComplete(() => { + console.info('RichText onComplete'); + }) + .size({ width: '100%', height: 110 }) + .backgroundColor(0X92D6CC) + .layoutWeight(1) + RichText('layoutWeight(2)') + .onStart(() => { + console.info('RichText onStart'); + }) + .onComplete(() => { + console.info('RichText onComplete'); + }) + .size({ width: '100%', height: 110 }) + .backgroundColor(0X92C48D) + .layoutWeight(2) } } }