Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
93963736
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
93963736
编写于
9月 26, 2022
作者:
S
sienna1128
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
sienna1128
<
lixiaoyan45@huawei.com
>
上级
5fc92ff1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
4 deletion
+4
-4
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-location.md
...ev/reference/arkui-ts/ts-universal-attributes-location.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md
...dev/reference/arkui-ts/ts-universal-attributes-opacity.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md
...on-dev/reference/arkui-ts/ts-universal-attributes-size.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-component-area-change-event.md
...ence/arkui-ts/ts-universal-component-area-change-event.md
+1
-1
未找到文件。
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-location.md
浏览文件 @
93963736
...
...
@@ -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
})
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md
浏览文件 @
93963736
...
...
@@ -12,7 +12,7 @@
| 名称 | 参数类型 | 描述 |
| ------- | ---------------------------------------- | ---------------------------------------- |
| opacity | number
\|
[
Resource
](
ts-types.md#resource
)
| 元素的不透明度,取值范围为0到1,1表示不透明,0表示完全透明, 达到隐藏组件效果,但是在布局中占位
,与
[
Visibility
](
ts-universal-attributes-visibility.md
)
.Hidden效果相似
<br>
默认值:1 |
| opacity | number
\|
[
Resource
](
ts-types.md#resource
)
| 元素的不透明度,取值范围为0到1,1表示不透明,0表示完全透明, 达到隐藏组件效果,但是在布局中占位
。
<br>
默认值:1 |
## 示例
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md
浏览文件 @
93963736
...
...
@@ -16,7 +16,7 @@
| height |
[
Length
](
ts-types.md#length
)
| 设置组件自身的高度,缺省时使用元素自身内容需要的高度。若子组件的高大于父组件的高,则会画出父组件的范围。 |
| size | {
<br/>
width?:
[Length](ts-types.md#length),
<br/>
height?:
[
Length
](
ts-types.md#length
)
<br/>
} | 设置高宽尺寸。 |
| padding |
[
Padding
](
ts-types.md#padding
)
\|
[
Length
](
ts-types.md#length
)
| 设置内边距属性,默认无内边距。
<br/>
参数为Length类型时,上下左右内边距同时生效。
<br/>
参数为Padding对象时,可以分别设置上下左右的内边距。
<br/>
当padding设置百分比时,上下左右内边距均以父容器的width作为基础值。 |
| margin |
[
Margin
](
ts-types.md#margin
)
\|
[
Length
](
ts-types.md#length
)
| 设置外边距属性,默认无外边距。
<br/>
参数为Length类型时,上下左右外边距同时生效。
<br/>
参数为Margin对象时,可以分别设置上下左右的外边距。
<br/>
margin设置百分比时,上下左右
内
边距均以父容器的width作为基础值。|
| margin |
[
Margin
](
ts-types.md#margin
)
\|
[
Length
](
ts-types.md#length
)
| 设置外边距属性,默认无外边距。
<br/>
参数为Length类型时,上下左右外边距同时生效。
<br/>
参数为Margin对象时,可以分别设置上下左右的外边距。
<br/>
margin设置百分比时,上下左右
外
边距均以父容器的width作为基础值。|
| constraintSize | {
<br/>
minWidth?:
[Length](ts-types.md#length),
<br/>
maxWidth?:
[Length](ts-types.md#length),
<br/>
minHeight?:
[Length](ts-types.md#length),
<br/>
maxHeight?:
[
Length
](
ts-types.md#length
)
<br/>
} | 设置约束尺寸,组件布局时,进行尺寸范围限制。constraintSize的优先级高于Width和Height。
<br>
默认值:
<br>
{
<br/>
minWidth:
0,
<br/>
maxWidth:
Infinity,
<br/>
minHeight:
0,
<br/>
maxHeight:
Infinity
<br/>
} |
| layoutWeight | number
\|
string | 父容器尺寸确定时,设置了layoutWeight属性的子元素与兄弟元素占主轴尺寸按照权重进行分配,忽略元素本身尺寸设置,表示自适应占满剩余空间。
<br>
**说明:**
<br/>
仅在Row/Column/Flex布局中生效。|
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-component-area-change-event.md
浏览文件 @
93963736
# 组件区域变化事件
组件
区域变化事件指组件显示的尺寸、位置等发生变化时触发的事件
。
组件
可见区域变化事件是组件在屏幕中的显示区域面积变化时触发的事件,提供了判断组件是否完全或部分显示在屏幕中的能力,适用于广告曝光埋点之类的场景
。
> **说明:**
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录