Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-09-11 10:06:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9e9d3471d08679576082f220dc006c9a0ecc7613
9e9d3471
1 parent
00002f3e
fix: 升级lottie三方库最新版本,修改沉浸式视频引导动画销毁逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
27 deletions
sight_harmony/features/wdComponent/src/main/ets/components/lottie/LottieView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/oh-package.json5
sight_harmony/features/wdComponent/src/main/ets/components/lottie/LottieView.ets
View file @
9e9d347
...
...
@@ -49,7 +49,8 @@ export struct LottieView {
onDestroyAnimation(){
// 销毁动画,减少缓存
if (this.animateItem !== null) {
this.animateItem.destroy(this.name);
lottie.destroy(this.name)
// console.log('lottie', 'onDestroyAnimation')
this.animateItem = null;
}
...
...
@@ -68,6 +69,7 @@ export struct LottieView {
}
})
.onDisAppear(()=>{
// console.log('lottie', 'onDisAppear')
this.onDestroyAnimation()
})
.onAppear(()=>{
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
9e9d347
...
...
@@ -420,18 +420,16 @@ export struct DetailVideoListPage {
this.GestureLoadStrategy = 1
})
// 手势动画 初次进入显示
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
.visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.onTouch(() => {
this.GestureLoadStrategy = 1
if(this.GestureLoadStrategy == 0) {
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
}
}
}
.width('100%')
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
9e9d347
...
...
@@ -16,7 +16,6 @@ import { window } from '@kit.ArkUI';
import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { LottieView } from 'wdComponent/Index'
import lottie from '@ohos/lottie';
interface loadMoreData {
pageNum: number;
...
...
@@ -349,20 +348,16 @@ export struct VideoChannelDetail {
this.GestureLoadStrategy = 1
})
// 手势动画 初次进入显示
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
.visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.None)
.onTouch(() => {
this.GestureLoadStrategy = 1
lottie.destroy('slider_up_view_more')
if(this.isMouted && this.GestureLoadStrategy == 0) {
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
}
}
}
.width('100%')
...
...
sight_harmony/oh-package.json5
View file @
9e9d347
...
...
@@ -11,7 +11,7 @@
"version"
:
"1.0.0"
,
"dependencies"
:
{
"@ohos/pulltorefresh"
:
"^2.0.6-rc.0"
,
"@ohos/lottie"
:
"
v2.0.11-rc.6
"
,
"@ohos/lottie"
:
"
^v2.0.13
"
,
"@ohos/imageknife"
:
"^2.1.2"
,
}
,
"dynamicDependencies"
:
{}
...
...
Please
register
or
login
to post a comment