Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
428f257c
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1598
Star
27
Fork
9
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
Hello UTS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
428f257c
编写于
12月 23, 2022
作者:
打打卡夫卡
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复lottie组件示例代码错误
上级
418087cf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
18 deletion
+19
-18
pages/SDKIntegration/Lottie/index.nvue
pages/SDKIntegration/Lottie/index.nvue
+1
-1
uni_modules/uts-animation-view/utssdk/app-android/index.vue
uni_modules/uts-animation-view/utssdk/app-android/index.vue
+18
-17
未找到文件。
pages/SDKIntegration/Lottie/index.nvue
浏览文件 @
428f257c
...
...
@@ -29,7 +29,7 @@
widthNum: 375,
heightNum: 200,
comShow: true,
animUrl: "
AndroidWave
.json"
animUrl: "
anim_a
.json"
}
},
...
...
uni_modules/uts-animation-view/utssdk/app-android/index.vue
浏览文件 @
428f257c
...
...
@@ -88,7 +88,7 @@
if
(
this
.
$el
!=
null
){
let
lottieAnimationView
=
this
.
$el
let
lottieAnimationView
=
this
.
$el
!
if
(
!
TextUtils
.
isEmpty
(
newPath
))
{
if
(
newPath
.
startsWith
(
"
http://
"
)
||
newPath
.
startsWith
(
"
https://
"
))
{
lottieAnimationView
.
setAnimationFromUrl
(
newPath
)
...
...
@@ -108,14 +108,14 @@
handler
(
newLoop
:
Boolean
)
{
if
(
this
.
$el
!=
null
){
if
(
newLoop
)
{
this
.
$el
.
repeatCount
=
Int
.
MAX_VALUE
this
.
$el
!
.
repeatCount
=
Int
.
MAX_VALUE
}
else
{
// 不循环则设置成1次
this
.
$el
.
repeatCount
=
0
this
.
$el
!
.
repeatCount
=
0
}
if
(
this
.
autoplay
)
{
this
.
$el
.
playAnimation
()
this
.
$el
!
.
playAnimation
()
}
}
...
...
@@ -127,7 +127,7 @@
handler
(
newValue
:
boolean
)
{
if
(
this
.
$el
!=
null
){
if
(
newValue
)
{
this
.
$el
.
playAnimation
()
this
.
$el
!
.
playAnimation
()
}
}
...
...
@@ -142,12 +142,12 @@
if
(
this
.
$el
!=
null
){
if
(
this
.
action
==
"
play
"
)
{
this
.
$el
.
playAnimation
()
this
.
$el
!
.
playAnimation
()
}
else
if
(
this
.
action
==
"
pause
"
)
{
this
.
$el
.
pauseAnimation
()
this
.
$el
!
.
pauseAnimation
()
}
else
if
(
this
.
action
==
"
stop
"
)
{
this
.
$el
.
cancelAnimation
()
this
.
$el
.
clearAnimation
()
this
.
$el
!
.
cancelAnimation
()
this
.
$el
!
.
clearAnimation
()
}
}
...
...
@@ -163,9 +163,9 @@
handler
(
newValue
:
boolean
)
{
if
(
this
.
$el
!=
null
){
if
(
newValue
)
{
this
.
$el
.
visibility
=
View
.
GONE
this
.
$el
!
.
visibility
=
View
.
GONE
}
else
{
this
.
$el
.
visibility
=
View
.
VISIBLE
this
.
$el
!
.
visibility
=
View
.
VISIBLE
}
}
},
...
...
@@ -177,9 +177,9 @@
setRepeatMode
(
repeat
:
string
)
{
if
(
this
.
$el
!=
null
){
if
(
"
RESTART
"
==
repeat
)
{
this
.
$el
.
repeatMode
=
LottieDrawable
.
RESTART
this
.
$el
!
.
repeatMode
=
LottieDrawable
.
RESTART
}
else
if
(
"
REVERSE
"
==
repeat
)
{
this
.
$el
.
repeatMode
=
LottieDrawable
.
RESTART
this
.
$el
!
.
repeatMode
=
LottieDrawable
.
RESTART
}
}
},
...
...
@@ -197,13 +197,14 @@
let
lottieAnimationView
=
new
LottieAnimationView
(
$androidContext
)
return
lottieAnimationView
},
NVLoaded
()
{
//原生View已创建
//可选实现,这里可以做后续操作
if
(
this
.
$el
!=
null
){
this
.
$el
.
repeatMode
=
LottieDrawable
.
RESTART
;
this
.
$el
.
visibility
=
View
.
GONE
this
.
$el
.
repeatCount
=
0
this
.
$el
.
addAnimatorListener
(
new
CustomAnimListener
(
this
))
this
.
$el
!
.
repeatMode
=
LottieDrawable
.
RESTART
;
this
.
$el
!
.
visibility
=
View
.
GONE
this
.
$el
!
.
repeatCount
=
0
this
.
$el
!
.
addAnimatorListener
(
new
CustomAnimListener
(
this
))
}
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录