Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
870baa0f
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
870baa0f
编写于
10月 28, 2022
作者:
L
luoying_ace
提交者:
Gitee
10月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md.
Signed-off-by:
N
luoying_ace
<
luoying19@huawei.com
>
上级
6b1aab1e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
32 deletion
+6
-32
zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md
...application-dev/reference/arkui-ts/ts-animatorproperty.md
+6
-32
未找到文件。
zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md
浏览文件 @
870baa0f
...
@@ -31,24 +31,21 @@ animation(value: {duration?: number, tempo?: number, curve?: string | Curve | IC
...
@@ -31,24 +31,21 @@ animation(value: {duration?: number, tempo?: number, curve?: string | Curve | IC
struct
AttrAnimationExample
{
struct
AttrAnimationExample
{
@
State
widthSize
:
number
=
250
@
State
widthSize
:
number
=
250
@
State
heightSize
:
number
=
100
@
State
heightSize
:
number
=
100
@
State
changeColor
:
number
=
0xFF0000FF
@
State
rotateAngle
:
number
=
0
@
State
rotateAngle
:
number
=
0
@
State
flagA
:
boolean
=
true
@
State
flag
:
boolean
=
true
@
State
flagB
:
boolean
=
true
@
State
flagC
:
boolean
=
true
build
()
{
build
()
{
Column
()
{
Column
()
{
Button
(
'
change width and height
'
)
Button
(
'
change width and height
'
)
.
onClick
(()
=>
{
.
onClick
(()
=>
{
if
(
this
.
flag
A
)
{
if
(
this
.
flag
)
{
this
.
widthSize
=
100
this
.
widthSize
=
100
this
.
heightSize
=
50
this
.
heightSize
=
50
}
else
{
}
else
{
this
.
widthSize
=
250
this
.
widthSize
=
250
this
.
heightSize
=
100
this
.
heightSize
=
100
}
}
this
.
flag
A
=
!
this
.
flagA
this
.
flag
=
!
this
.
flag
})
})
.
margin
(
30
)
.
margin
(
30
)
.
width
(
this
.
widthSize
)
.
width
(
this
.
widthSize
)
...
@@ -56,43 +53,20 @@ struct AttrAnimationExample {
...
@@ -56,43 +53,20 @@ struct AttrAnimationExample {
.
animation
({
.
animation
({
duration
:
2000
,
duration
:
2000
,
curve
:
Curve
.
EaseOut
,
curve
:
Curve
.
EaseOut
,
delay
:
500
,
iterations
:
1
,
playMode
:
PlayMode
.
Normal
})
Button
(
'
change backgroundColor
'
)
.
onClick
(()
=>
{
if
(
this
.
flagB
)
{
this
.
changeColor
=
0xFFFF4500
}
else
{
this
.
changeColor
=
0xFF0000FF
}
this
.
flagB
=
!
this
.
flagB
})
.
margin
(
30
)
.
backgroundColor
(
this
.
changeColor
)
.
animation
({
duration
:
800
,
curve
:
Curve
.
ExtremeDeceleration
,
iterations
:
3
,
iterations
:
3
,
playMode
:
PlayMode
.
Normal
playMode
:
PlayMode
.
Normal
})
})
Button
(
'
change rotate angle
'
)
Button
(
'
change rotate angle
'
)
.
onClick
(()
=>
{
.
onClick
(()
=>
{
if
(
this
.
flagC
)
{
this
.
rotateAngle
=
90
this
.
rotateAngle
=
90
}
else
{
this
.
rotateAngle
=
0
}
this
.
flagC
=
!
this
.
flagC
})
})
.
margin
(
3
0
)
.
margin
(
5
0
)
.
rotate
({
angle
:
this
.
rotateAngle
})
.
rotate
({
angle
:
this
.
rotateAngle
})
.
animation
({
.
animation
({
duration
:
1200
,
duration
:
1200
,
curve
:
Curve
.
Friction
,
curve
:
Curve
.
Friction
,
delay
:
500
,
delay
:
500
,
iterations
:
10
,
iterations
:
-
1
,
// 设置-1表示动画无限循环
playMode
:
PlayMode
.
AlternateReverse
playMode
:
PlayMode
.
AlternateReverse
})
})
}.
width
(
'
100%
'
).
margin
({
top
:
20
})
}.
width
(
'
100%
'
).
margin
({
top
:
20
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录