From 0dd4d4c7d81d28ce543efc291bc61d44d31710b1 Mon Sep 17 00:00:00 2001 From: XHY Date: Mon, 16 Jan 2023 15:50:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20iOS=20=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-animation-view/utssdk/app-ios/index.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/index.vue b/uni_modules/uni-animation-view/utssdk/app-ios/index.vue index 3488848..7b8c1ae 100644 --- a/uni_modules/uni-animation-view/utssdk/app-ios/index.vue +++ b/uni_modules/uni-animation-view/utssdk/app-ios/index.vue @@ -80,15 +80,15 @@ watch: { "path": { handler(newValue: string, oldValue: string) { - this.path = newValue - this.playAnimation() + if (this.autoplay) { + this.playAnimation() + } }, immediate: false //创建时是否通过此方法更新属性,默认值为false }, "loop": { handler(newValue: boolean, oldValue: boolean) { - this.loop = newValue - if (this.loop) { + if (newValue) { this.$el.loopMode = LottieLoopMode.loop } else { this.$el.loopMode = LottieLoopMode.playOnce @@ -98,8 +98,7 @@ }, "autoplay": { handler(newValue: boolean, oldValue: boolean) { - this.autoplay = newValue - if (this.autoplay) { + if (newValue) { this.playAnimation() } }, @@ -108,9 +107,7 @@ "action": { handler(newValue: string, oldValue: string) { const action = newValue - if (action == "play" || action == "pause" || action == "stop") { - this.action = action switch (action) { case "play": this.playAnimation() @@ -133,7 +130,6 @@ "hidden": { handler(newValue: boolean, oldValue: boolean) { - this.hidden = newValue this.$el.isHidden = this.hidden }, immediate: false //创建时是否通过此方法更新属性,默认值为false -- GitLab