From a5fe7b8807c1927dbbfd09bffe0c0599e0726728 Mon Sep 17 00:00:00 2001 From: yanyilin Date: Sun, 29 Jan 2023 19:34:36 +0800 Subject: [PATCH] =?UTF-8?q?animation-view=E6=B7=BB=E5=8A=A0=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=92=8C=E7=BD=91=E7=BB=9C=E5=8A=A8=E7=94=BB=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- pages/index/index.nvue | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index a7b1a82..969da0b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name" : "uni-component", "appid" : "__UNI__0094991", - "description" : "", + "description" : "uts组件示例", "versionName" : "1.0.0", "versionCode" : "100", "transformPx" : false, diff --git a/pages/index/index.nvue b/pages/index/index.nvue index 745dbaa..0aa8945 100644 --- a/pages/index/index.nvue +++ b/pages/index/index.nvue @@ -4,6 +4,7 @@ :hidden="hidden" @bindended="lottieEnd"> + @@ -14,9 +15,10 @@ path: '/uni_modules/uni-animation-view/static/lottie.json', loop: false, autoplay: false, - action: 'play', + action: 'stop', hidden: false, - status: '暂停' + status: '播放', + location: '网络' } }, methods: { @@ -24,6 +26,13 @@ this.action = ('play' !== this.action) ? 'play' : 'pause'; this.status = ('pause' === this.action) ? '播放' : '暂停'; }, + changeLottie() { + this.action = 'stop'; + this.status = '播放'; + this.path = ('网络' === this.location) ? 'https://native-res.dcloud.net.cn/uni-app/static/lottie.json' : '/uni_modules/uni-animation-view/static/lottie.json'; + this.location = ('网络' === this.location) ? '本地' : '网络'; + console.log('path='+this.path); + }, lottieEnd() { this.status = '播放'; this.action = 'stop'; @@ -37,7 +46,7 @@ .animation { width: 750rpx; height: 300rpx; - background-color: #FF0000; + background-color: #CCCCCC; margin-bottom: 20px; } -- GitLab