diff --git a/manifest.json b/manifest.json index a7b1a829006979f717b14b46f56e9b584b4c1e4a..969da0b24396e4731a209a484570880a4b90ed48 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 745dbaa09090e2b56b0a1fcda3a22bb5fb08c05b..0aa8945b38875066696ab3e968135b48ca5d45ac 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; }