diff --git a/pages.json b/pages.json index a2153bb9c6f52140ec3dee8b1569c5808078a9ae..18e3486ed066fa84752e07b6dd4be2ea0e6faa6e 100644 --- a/pages.json +++ b/pages.json @@ -36,7 +36,7 @@ }, { - "path" : "pages/component/component", + "path" : "pages/component/helloView", "style" : { "navigationBarTitleText": "", diff --git a/pages/SDKIntegration/Lottie/index.nvue b/pages/SDKIntegration/Lottie/index.nvue index 2b964a391829c79960cda22481652613561c59dc..01527142392ebbb64c18ef834884e6520d14d478 100644 --- a/pages/SDKIntegration/Lottie/index.nvue +++ b/pages/SDKIntegration/Lottie/index.nvue @@ -67,15 +67,7 @@ }, changeRepeat: function(res) { - let repeatConfig = { - count: 3, - mode: "restart" - } - console.log(this.$refs["animView"]); - this.$refs["animView"].updateRepeatConfig(repeatConfig, function(res) { - console.log(res); - }); - + this.$refs["animView"].updateRepeatConfig("RESTART"); }, lottieClickTest: function(res) { console.log("lottieClickTest"); diff --git a/pages/advance/advance.vue b/pages/advance/advance.vue index 430397bbb1b6eae6b802d82ca0dc17f5ba32a62f..cf72516efa5794fef406e0513f411567bc9daba1 100644 --- a/pages/advance/advance.vue +++ b/pages/advance/advance.vue @@ -172,7 +172,7 @@ }, testHelloUTSComponent: function() { uni.navigateTo({ - url: '/pages/component/component' + url: '/pages/component/helloView' }) }, testSyntax: function() { diff --git a/pages/component/component.nvue b/pages/component/component.nvue deleted file mode 100644 index 49661fefc4a0204696d066e9739fac4093c9c5db..0000000000000000000000000000000000000000 --- a/pages/component/component.nvue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uni_modules/uts-animation-view/utssdk/app-android/index.vue b/uni_modules/uts-animation-view/utssdk/app-android/index.vue index 3d57dcd0bf1c81a8b8dfe1ba564ded3009112d06..8241a4fa083fab0700f6a777a7f83f54293d5743 100644 --- a/uni_modules/uts-animation-view/utssdk/app-android/index.vue +++ b/uni_modules/uts-animation-view/utssdk/app-android/index.vue @@ -87,12 +87,10 @@ "path": { handler(newPath: string) { - if(this.$el != null){ let lottieAnimationView = this.$el! if (!TextUtils.isEmpty(newPath)) { - if (newPath.startsWith("http://") || newPath.startsWith("https://")) { lottieAnimationView.setAnimationFromUrl(newPath) } else { @@ -106,7 +104,7 @@ } } }, - immediate: false //创建时是否通过此方法更新属性,默认值为false + immediate: false }, "loop": { handler(newLoop: Boolean) { @@ -124,7 +122,7 @@ } }, - immediate: false //创建时是否通过此方法更新属性,默认值为false + immediate: false }, "autoplay": { @@ -136,7 +134,7 @@ } }, - immediate: false //创建时是否通过此方法更新属性,默认值为false + immediate: false }, "action": { @@ -154,13 +152,12 @@ this.$el!.clearAnimation() } } - } else { // 非法入参,不管 } }, - immediate: false //创建时是否通过此方法更新属性,默认值为false + immediate: false }, "hidden": { @@ -173,7 +170,7 @@ } } }, - immediate: false //创建时是否通过此方法更新属性,默认值为false + immediate: false }, }, @@ -187,43 +184,22 @@ } } }, - privateMethod() { //如何定义不对外暴露的API? 暂不支持,需在export外写 - } - }, - created() { //创建组件,替换created - }, - NVBeforeLoad() { //组件将要创建,对应前端beforeMount - //可选实现,这里可以提前做一些操作 - }, - NVLoad(): LottieAnimationView { //创建原生View,必须定义返回值类型(Android需要明确知道View类型,需特殊校验) - //必须实现 + + NVLoad(): LottieAnimationView { let lottieAnimationView = new LottieAnimationView($androidContext) return lottieAnimationView }, - NVLoaded() { //原生View已创建 - //可选实现,这里可以做后续操作 + NVLoaded() { if(this.$el != null){ this.$el!.repeatMode = LottieDrawable.RESTART; this.$el!.visibility = View.GONE this.$el!.repeatCount = 0 this.$el!.addAnimatorListener(new CustomAnimListener(this)) } - - }, - NVLayouted() { //原生View布局完成 - //可选实现,这里可以做布局后续操作 - }, - NVBeforeUnload() { //原生View将释放 - //可选实现,这里可以做释放View之前的操作 - }, - NVUnloaded() { //原生View已释放 - //可选实现,这里可以做释放View之后的操作 - }, - unmounted() { //组件销毁 - //可选实现 } + }