From fe8e00f6bf34e9b8a22a0b99ba4d72b49a4b7ce5 Mon Sep 17 00:00:00 2001 From: XHY Date: Mon, 16 Jan 2023 18:16:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4iOS=E5=B9=B3=E5=8F=B0=20uts-h?= =?UTF-8?q?ello-component=20=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utssdk/app-ios/index.vue | 20 ++---- .../utssdk/app-ios/container.vue | 19 ++++++ .../utssdk/app-ios/index.vue | 67 +++++++++++++++++++ 3 files changed, 92 insertions(+), 14 deletions(-) create mode 100644 uni_modules/uts-hello-component/utssdk/app-ios/container.vue create mode 100644 uni_modules/uts-hello-component/utssdk/app-ios/index.vue diff --git a/uni_modules/uts-animation-view/utssdk/app-ios/index.vue b/uni_modules/uts-animation-view/utssdk/app-ios/index.vue index 749ad6c..da2996e 100644 --- a/uni_modules/uts-animation-view/utssdk/app-ios/index.vue +++ b/uni_modules/uts-animation-view/utssdk/app-ios/index.vue @@ -10,12 +10,8 @@ LottieLoopMode } from 'Lottie' import { - URL, - Bundle + URL } from 'Foundation' - import { - UIView - } from "UIKit" import { UTSiOS } from "DCloudUTSFoundation" @@ -80,15 +76,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 +94,7 @@ }, "autoplay": { handler(newValue: boolean, oldValue: boolean) { - this.autoplay = newValue - if (this.autoplay) { + if (newValue) { this.playAnimation() } }, @@ -108,9 +103,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 +126,6 @@ "hidden": { handler(newValue: boolean, oldValue: boolean) { - this.hidden = newValue this.$el.isHidden = this.hidden }, immediate: false //创建时是否通过此方法更新属性,默认值为false diff --git a/uni_modules/uts-hello-component/utssdk/app-ios/container.vue b/uni_modules/uts-hello-component/utssdk/app-ios/container.vue new file mode 100644 index 0000000..bbc26cd --- /dev/null +++ b/uni_modules/uts-hello-component/utssdk/app-ios/container.vue @@ -0,0 +1,19 @@ + + diff --git a/uni_modules/uts-hello-component/utssdk/app-ios/index.vue b/uni_modules/uts-hello-component/utssdk/app-ios/index.vue new file mode 100644 index 0000000..5ac5f0e --- /dev/null +++ b/uni_modules/uts-hello-component/utssdk/app-ios/index.vue @@ -0,0 +1,67 @@ + + \ No newline at end of file -- GitLab