From fb578b67f3a3c9c18bcc744e2683cf2aa01be46d Mon Sep 17 00:00:00 2001 From: duqingquan Date: Thu, 1 Aug 2024 17:21:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=87=E5=87=86=E5=9F=BA?= =?UTF-8?q?=E5=BA=A7=E8=BF=90=E8=A1=8C=20lottie=E5=8A=A8=E7=94=BB=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../animation-view/animation-view.uvue | 25 +++++++++++++++++-- pages/tabBar/template.uvue | 9 ------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/pages/component/animation-view/animation-view.uvue b/pages/component/animation-view/animation-view.uvue index 47eb40b8..5750b727 100644 --- a/pages/component/animation-view/animation-view.uvue +++ b/pages/component/animation-view/animation-view.uvue @@ -7,7 +7,10 @@ - @@ -28,10 +31,28 @@ widthNum: 750, heightNum: 200, comShow: true, - animUrl: "/static/anim_a.json" + animUrl: "/static/anim_a.json", + androidStandardLauncher:false, } }, + onLoad() { + // #ifdef APP-ANDROID + try{ + Class.forName("com.airbnb.lottie.LottieAnimationView") + androidStandardLauncher = false + }catch(e:Exception){ + androidStandardLauncher = true + } + if(androidStandardLauncher){ + uni.showModal({ + title:'当前示例需要自定义基座运行', + showCancel:false + }) + } + // #endif + }, + methods: { changeAutoPlay: function() { diff --git a/pages/tabBar/template.uvue b/pages/tabBar/template.uvue index aca22667..d856df0e 100644 --- a/pages/tabBar/template.uvue +++ b/pages/tabBar/template.uvue @@ -209,15 +209,6 @@ pages: [] as Page[], }, // #endif - // #ifdef APP-ANDROID - { - id: 'lottie-anim', - url: 'lottie-anim', - name: 'lottie动画-需要自定义基座', - open: false, - pages: [] as Page[], - }, - // #endif // #ifdef WEB { id: 'browser-element', -- GitLab