diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-location.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-location.md index d92d5340c785e5820b032f9ea9a76b197dcb4311..51b2672e42ebd168c53e3dff719c6e1059107d60 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-location.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-location.md @@ -134,7 +134,7 @@ struct PositionExample2 { .align(Alignment.Start) .offset({ x: 15, y: 30 }) Text('3').size({ width: '15%', height: '50' }).backgroundColor(0xdeb887).border({ width: 1 }).fontSize(16) - Text('4offset(-10%, 20%)') + Text('4 offset(-10%, 20%)') .size({ width: 100, height: '50' }) .backgroundColor(0xbbb2cb) .border({ width: 1 }) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md index 7cbeabbe32f30ae357ae8e683ac2b69346419f90..6f0dd480a60612d8fd293ab059842cddc12f9e6e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md @@ -12,7 +12,7 @@ | 名称 | 参数类型 | 描述 | | ------- | ---------------------------------------- | ---------------------------------------- | -| opacity | number \| [Resource](ts-types.md#resource) | 元素的不透明度,取值范围为0到1,1表示不透明,0表示完全透明, 达到隐藏组件效果,但是在布局中占位,与[Visibility](ts-universal-attributes-visibility.md).Hidden效果相似
默认值:1 | +| opacity | number \| [Resource](ts-types.md#resource) | 元素的不透明度,取值范围为0到1,1表示不透明,0表示完全透明, 达到隐藏组件效果,但是在布局中占位。
默认值:1 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md index 35083e084df3e14fb1f655afd60478363e0d6b1d..5d4acc5925d872e031ec7a8a9a35133a9aae1e33 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md @@ -16,7 +16,7 @@ | height | [Length](ts-types.md#length) | 设置组件自身的高度,缺省时使用元素自身内容需要的高度。若子组件的高大于父组件的高,则会画出父组件的范围。 | | size | {
width?: [Length](ts-types.md#length),
height?: [Length](ts-types.md#length)
} | 设置高宽尺寸。 | | padding | [Padding](ts-types.md#padding) \| [Length](ts-types.md#length) | 设置内边距属性,默认无内边距。
参数为Length类型时,上下左右内边距同时生效。
参数为Padding对象时,可以分别设置上下左右的内边距。
当padding设置百分比时,上下左右内边距均以父容器的width作为基础值。 | -| margin | [Margin](ts-types.md#margin) \| [Length](ts-types.md#length) | 设置外边距属性,默认无外边距。
参数为Length类型时,上下左右外边距同时生效。
参数为Margin对象时,可以分别设置上下左右的外边距。
margin设置百分比时,上下左右内边距均以父容器的width作为基础值。| +| margin | [Margin](ts-types.md#margin) \| [Length](ts-types.md#length) | 设置外边距属性,默认无外边距。
参数为Length类型时,上下左右外边距同时生效。
参数为Margin对象时,可以分别设置上下左右的外边距。
margin设置百分比时,上下左右外边距均以父容器的width作为基础值。| | constraintSize | {
minWidth?: [Length](ts-types.md#length),
maxWidth?: [Length](ts-types.md#length),
minHeight?: [Length](ts-types.md#length),
maxHeight?: [Length](ts-types.md#length)
} | 设置约束尺寸,组件布局时,进行尺寸范围限制。constraintSize的优先级高于Width和Height。
默认值:
{
minWidth: 0,
maxWidth: Infinity,
minHeight: 0,
maxHeight: Infinity
} | | layoutWeight | number \| string | 父容器尺寸确定时,设置了layoutWeight属性的子元素与兄弟元素占主轴尺寸按照权重进行分配,忽略元素本身尺寸设置,表示自适应占满剩余空间。
**说明:**
仅在Row/Column/Flex布局中生效。| diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-component-area-change-event.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-component-area-change-event.md index fb78261211c4b65798427d16c61372b017f0c043..144f621fec9f1829805420a98c277cbb05f4fabc 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-component-area-change-event.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-component-area-change-event.md @@ -1,6 +1,6 @@ # 组件区域变化事件 -组件区域变化事件指组件显示的尺寸、位置等发生变化时触发的事件。 +组件可见区域变化事件是组件在屏幕中的显示区域面积变化时触发的事件,提供了判断组件是否完全或部分显示在屏幕中的能力,适用于广告曝光埋点之类的场景。 > **说明:** >