Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
3c13273a
U
uni-app
项目概览
DCloud
/
uni-app
14 天 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3c13273a
编写于
6月 20, 2023
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
46dec8cb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
5 deletion
+7
-5
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-component/utssdk/app-android/index.kt.map
...ni_modules/test-component/utssdk/app-android/index.kt.map
+1
-1
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-component/utssdk/app-ios/index.swift.map
...uni_modules/test-component/utssdk/app-ios/index.swift.map
+1
-1
packages/uni-automator/lib/uni.plugin.js
packages/uni-automator/lib/uni.plugin.js
+4
-2
packages/uni-cloud/lib/uni.plugin.js
packages/uni-cloud/lib/uni.plugin.js
+1
-1
未找到文件。
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-component/utssdk/app-android/index.kt.map
浏览文件 @
3c13273a
{"version":3,"sources":["uni_modules/test-component/utssdk/app-android/index.vue"],"sourcesContent":["\n\n\n\n\n\nimport Animator from 'android.animation.Animator'\nimport TextUtils from 'android.text.TextUtils'\nimport View from 'android.view.View'\nimport LottieAnimationView from 'com.airbnb.lottie.LottieAnimationView'\nimport LottieDrawable from 'com.airbnb.lottie.LottieDrawable'\n\n\nclass CustomAnimListener extends Animator.AnimatorListener {\n\n comp: UTSComponent<LottieAnimationView>\n constructor(com: UTSComponent<LottieAnimationView>) {\n super();\n this.comp = com\n }\n\n override onAnimationStart(animation: Animator | null) {\n }\n\n override onAnimationEnd(animation: Animator | null, isReverse: Boolean) {\n this.comp.emit(\"bindended\")\n }\n\n override onAnimationEnd(animation: Animator | null) {\n }\n\n override onAnimationCancel(animation: Animator | null) {\n }\n\n override onAnimationRepeat(animation: Animator | null) {\n }\n}\n\n//原生提供以下属性或方法的实现 \nexport default {\n /**\n * 当播放到末尾时触发 ended 事件(自然播放结束会触发回调,循环播放结束及手动停止动画不会触发)\n */\n emits: ['bindended'],\n props: {\n /**\n * 动画资源地址,目前只支持绝对路径\n */\n \"path\": {\n type: String,\n\t\t\tdefault:\"\"\n },\n /**\n * 动画是否循环播放\n */\n \"autoplay\": {\n type: Boolean,\n\t\t\tdefault:false\n },\n /**\n * 动画是否自动播放\n */\n \"loop\": {\n type: Boolean,\n\t\t\tdefault:false\n },\n /**\n * 是否隐藏动画\n */\n \"hidden\": {\n type: Boolean,\n\t\t\tdefault:false\n },\n /**\n * 动画操作,可取值 play、pause、stop\n */\n \"action\": {\n type: String,\n\t\t\tdefault:\"stop\"\n }\n\n },\n data() {\n return {\n\n }\n },\n watch: {\n \"path\": {\n handler(newPath: string, oldPath: string) {\n\n let lottieAnimationView = this.$el\n\n if (lottieAnimationView != null && !TextUtils.isEmpty(newPath)) {\n if (newPath.startsWith(\"http://\") || newPath.startsWith(\"https://\")) {\n lottieAnimationView.setAnimationFromUrl(newPath)\n } else {\n // 默认是asset了\n lottieAnimationView.setAnimation(newPath)\n }\n }\n if (this.autoplay) {\n lottieAnimationView.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"loop\": {\n handler(newLoop: Boolean, oldLoop: Boolean) {\n\n if (newLoop) {\n this.$el.repeatCount = Int.MAX_VALUE\n } else {\n // 不循环则设置成1次\n this.$el.repeatCount = 0\n }\n\n if (this.autoplay) {\n this.$el.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"autoplay\": {\n handler(newValue: boolean, oldValue: boolean) {\n\n if (newValue) {\n this.$el.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"action\": {\n handler(newAction: string, oldAction: string) {\n\n if (newAction == \"play\" || newAction == \"pause\" || newAction == \"stop\") {\n\n\n if (this.action == \"play\") {\n this.$el.playAnimation()\n } else if (this.action == \"play\") {\n this.$el.pauseAnimation()\n } else if (this.action == \"stop\") {\n this.$el.cancelAnimation()\n this.$el.clearAnimation()\n }\n\n } else {\n // 非法入参,不管\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"hidden\": {\n handler(newValue: boolean, oldValue: boolean) {\n\n if (newValue) {\n this.$el.visibility = View.GONE\n } else {\n this.$el.visibility = View.VISIBLE\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n },\n methods: {\n setRepeatMode(repeat: string) {\n if (\"RESTART\" == repeat) {\n this.$el.repeatMode = LottieDrawable.RESTART\n } else if (\"REVERSE\" == repeat) {\n this.$el.repeatMode = LottieDrawable.RESTART\n }\n },\n privateMethod() {\t//如何定义不对外暴露的API? 暂不支持,需在export外写 \n }\n },\n created() {\t\t\t//创建组件,替换created \n\n },\n NVBeforeLoad() {\t\t//组件将要创建,对应前端beforeMount \n //可选实现,这里可以提前做一些操作 \n },\n NVLoad(): LottieAnimationView { //创建原生View,必须定义返回值类型(Android需要明确知道View类型,需特殊校验) \n //必须实现 \n let lottieAnimationView = new LottieAnimationView(getContext())\n return lottieAnimationView\n },\n NVLoaded() {\t\t\t//原生View已创建 \n //可选实现,这里可以做后续操作 \n this.$el.repeatMode = LottieDrawable.RESTART;\n this.$el.visibility = View.GONE\n this.$el.repeatCount = 0\n this.$el.addAnimatorListener(new CustomAnimListener(this))\n\n },\n NVLayouted() {\t//原生View布局完成 \n //可选实现,这里可以做布局后续操作 \n },\n NVBeforeUnload() {\t\t//原生View将释放 \n //可选实现,这里可以做释放View之前的操作 \n },\n NVUnloaded() {\t\t\t//原生View已释放 \n //可选实现,这里可以做释放View之后的操作 \n },\n NVMeasure(size: UTSSize): UTSSize {\n return UTSSize(100, 100)\n },\n unmounted() {\t//组件销毁 \n //可选实现 \n }\n}\n\n\n\n\n\n\n\n\n"],"names":[],"mappings":";;;;;;;AAMA,OAAqB,0BAA4B,CAAA;AACjD,OAAsB,sBAAwB,CAAA;AAC9C,OAAiB,iBAAmB,CAAA;AACpC,OAAgC,qCAAuC,CAAA;AACvE,OAA2B,gCAAkC,CAAA;;;;;;;;AAG7D,WAAM,qBAA2B,SAAS,gBAAgB;IAEtD,SAAA,MAAM,aAAa,qBAAoB;IACvC,YAAY,KAAK,aAAa,oBAAoB,IAC9C,KAAK,GAD2C;QAEhD,IAAI,CAAC,IAAI,GAAG;IAChB;IAEA,aAAS,iBAAiB,WAAW,SAAe,EAAE,CACtD;IAEA,aAAS,eAAe,WAAW,SAAe,EAAE,WAAW,OAAO,EAAE;QACpE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IACnB;IAEA,aAAS,eAAe,WAAW,SAAe,EAAE,CACpD;IAEA,aAAS,kBAAkB,WAAW,SAAe,EAAE,CACvD;IAEA,aAAS,kBAAkB,WAAW,SAAe,EAAE,CACvD;AACJ;iDAsJc;;mBAzII,SACP;uBAMO,UACP,KAAK;mBAME,UACP,KAAK;qBAME,UACP,KAAK;qBAME,SACP;2BAsGG,CAEV;gCACe,CAEf;2BACU,oBAAoB;QAE1B,IAAI,sBAAsB,AAAI,oBAAoB;QAClD,OAAO;IACX;4BACW;QAEP,IAAI,CAAC,KAAG,CAAC,UAAU,GAAG,eAAe,OAAO;QAC5C,IAAI,CAAC,KAAG,CAAC,UAAU,GAAG,KAAK,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aAAa;qBACnB,IAAI,IAAI,CAAC,MAAM,IAAI,QACtB,IAAI,CAAC,KAAG,CAAC,cAAc;qBACpB,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ;oBAC9B,IAAI,CAAC,KAAG,CAAC,eAAe;oBACxB,IAAI,CAAC,KAAG,CAAC,cAAc;gBAC3B;YAEJ;QAGJ;;sBAKqC,OAAO,gBAApC,UAAmB,SAAmB;YAE1C,IAAI,UACA,IAAI,CAAC,KAAG,CAAC,UAAU,GAAG,KAAK,IAAI;iBAE/B,IAAI,CAAC,KAAG,CAAC,UAAU,GAAG,KAAK,OAAO;QAE1C;;;;qCAnHM;;;;;yCAOA;;;;;qCAOA;;;;;uCAOA;;;;;uCAOA"}
\ No newline at end of file
{"version":3,"sources":["uni_modules/test-component/utssdk/app-android/index.vue"],"sourcesContent":["\n\n\n\n\n\nimport Animator from 'android.animation.Animator'\nimport TextUtils from 'android.text.TextUtils'\nimport View from 'android.view.View'\nimport LottieAnimationView from 'com.airbnb.lottie.LottieAnimationView'\nimport LottieDrawable from 'com.airbnb.lottie.LottieDrawable'\n\n\nclass CustomAnimListener extends Animator.AnimatorListener {\n\n comp: UTSComponent<LottieAnimationView>\n constructor(com: UTSComponent<LottieAnimationView>) {\n super();\n this.comp = com\n }\n\n override onAnimationStart(animation: Animator | null) {\n }\n\n override onAnimationEnd(animation: Animator | null, isReverse: Boolean) {\n this.comp.emit(\"bindended\")\n }\n\n override onAnimationEnd(animation: Animator | null) {\n }\n\n override onAnimationCancel(animation: Animator | null) {\n }\n\n override onAnimationRepeat(animation: Animator | null) {\n }\n}\n\n//原生提供以下属性或方法的实现 \nexport default {\n /**\n * 当播放到末尾时触发 ended 事件(自然播放结束会触发回调,循环播放结束及手动停止动画不会触发)\n */\n emits: ['bindended'],\n props: {\n /**\n * 动画资源地址,目前只支持绝对路径\n */\n \"path\": {\n type: String,\n\t\t\tdefault:\"\"\n },\n /**\n * 动画是否循环播放\n */\n \"autoplay\": {\n type: Boolean,\n\t\t\tdefault:false\n },\n /**\n * 动画是否自动播放\n */\n \"loop\": {\n type: Boolean,\n\t\t\tdefault:false\n },\n /**\n * 是否隐藏动画\n */\n \"hidden\": {\n type: Boolean,\n\t\t\tdefault:false\n },\n /**\n * 动画操作,可取值 play、pause、stop\n */\n \"action\": {\n type: String,\n\t\t\tdefault:\"stop\"\n }\n\n },\n data() {\n return {\n\n }\n },\n watch: {\n \"path\": {\n handler(newPath: string, oldPath: string) {\n\n let lottieAnimationView = this.$el\n\n if (lottieAnimationView != null && !TextUtils.isEmpty(newPath)) {\n if (newPath.startsWith(\"http://\") || newPath.startsWith(\"https://\")) {\n lottieAnimationView.setAnimationFromUrl(newPath)\n } else {\n // 默认是asset了\n lottieAnimationView.setAnimation(newPath)\n }\n }\n if (this.autoplay) {\n lottieAnimationView.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"loop\": {\n handler(newLoop: Boolean, oldLoop: Boolean) {\n\n if (newLoop) {\n this.$el.repeatCount = Int.MAX_VALUE\n } else {\n // 不循环则设置成1次\n this.$el.repeatCount = 0\n }\n\n if (this.autoplay) {\n this.$el.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"autoplay\": {\n handler(newValue: boolean, oldValue: boolean) {\n\n if (newValue) {\n this.$el.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"action\": {\n handler(newAction: string, oldAction: string) {\n\n if (newAction == \"play\" || newAction == \"pause\" || newAction == \"stop\") {\n\n\n if (this.action == \"play\") {\n this.$el.playAnimation()\n } else if (this.action == \"play\") {\n this.$el.pauseAnimation()\n } else if (this.action == \"stop\") {\n this.$el.cancelAnimation()\n this.$el.clearAnimation()\n }\n\n } else {\n // 非法入参,不管\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"hidden\": {\n handler(newValue: boolean, oldValue: boolean) {\n\n if (newValue) {\n this.$el.visibility = View.GONE\n } else {\n this.$el.visibility = View.VISIBLE\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n },\n methods: {\n setRepeatMode(repeat: string) {\n if (\"RESTART\" == repeat) {\n this.$el.repeatMode = LottieDrawable.RESTART\n } else if (\"REVERSE\" == repeat) {\n this.$el.repeatMode = LottieDrawable.RESTART\n }\n },\n privateMethod() {\t//如何定义不对外暴露的API? 暂不支持,需在export外写 \n }\n },\n created() {\t\t\t//创建组件,替换created \n\n },\n NVBeforeLoad() {\t\t//组件将要创建,对应前端beforeMount \n //可选实现,这里可以提前做一些操作 \n },\n NVLoad(): LottieAnimationView { //创建原生View,必须定义返回值类型(Android需要明确知道View类型,需特殊校验) \n //必须实现 \n let lottieAnimationView = new LottieAnimationView(getContext())\n return lottieAnimationView\n },\n NVLoaded() {\t\t\t//原生View已创建 \n //可选实现,这里可以做后续操作 \n this.$el.repeatMode = LottieDrawable.RESTART;\n this.$el.visibility = View.GONE\n this.$el.repeatCount = 0\n this.$el.addAnimatorListener(new CustomAnimListener(this))\n\n },\n NVLayouted() {\t//原生View布局完成 \n //可选实现,这里可以做布局后续操作 \n },\n NVBeforeUnload() {\t\t//原生View将释放 \n //可选实现,这里可以做释放View之前的操作 \n },\n NVUnloaded() {\t\t\t//原生View已释放 \n //可选实现,这里可以做释放View之后的操作 \n },\n NVMeasure(size: UTSSize): UTSSize {\n return UTSSize(100, 100)\n },\n unmounted() {\t//组件销毁 \n //可选实现 \n }\n}\n\n\n\n\n\n\n\n\n"],"names":[],"mappings":";;;;;;;AAMA,OAAqB,0BAA4B,CAAA;AACjD,OAAsB,sBAAwB,CAAA;AAC9C,OAAiB,iBAAmB,CAAA;AACpC,OAAgC,qCAAuC,CAAA;AACvE,OAA2B,gCAAkC,CAAA;;;;;;;;AAG7D,WAAM,qBAA2B,SAAS,gBAAgB;IAEtD,SAAA,MAAM,aAAa,qBAAoB;IACvC,YAAY,KAAK,aAAa,oBAAoB,IAC9C,KAAK,GAD2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AAC,aACpD,oBAAoB,mBAAmB,CAAC;qBAGxC,oBAAoB,YAAY,CAAC;;YAGzC,IAAI,IAAI,CAAC,QAAQ,EACb,oBAAoB,aAAa;QAEzC;;sBAImC,qBAA3B,SAAkB,QAAkB;YAExC,IAAI,SACA,IAAI,CAAC,KAAG,CAAC,WAAW,GAAG,IAAI,SAAS;iBAGpC,IAAI,CAAC,KAAG,CAAC,WAAW,GAAG,CAAC;YAG5B,IAAI,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,KAAG,CAAC,aAAa;QAE9B;;sBAKqC,OAAO,kBAApC,UAAmB,SAAmB;YAE1C,IAAI,UACA,IAAI,CAAC,KAAG,CAAC,aAAa;QAE9B;;sBAKsC,MAAM,gBAApC,WAAmB,UAAmB;YAE1C,IAAI,aAAa,UAAU,aAAa,WAAW,aAAa,QAAQ;gBAGpE,IAAI,IAAI,CAAC,MAAM,IAAI,QACf,IAAI,CAAC,KAAG,CAAC,aAAa;qBACnB,IAAI,IAAI,CAAC,MAAM,IAAI,QACtB,IAAI,CAAC,KAAG,CAAC,cAAc;qBACpB,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ;oBAC9B,IAAI,CAAC,KAAG,CAAC,eAAe;oBACxB,IAAI,CAAC,KAAG,CAAC,cAAc;gBAC3B;YAEJ;QAGJ;;sBAKqC,OAAO,gBAApC,UAAmB,SAAmB;YAE1C,IAAI,UACA,IAAI,CAAC,KAAG,CAAC,UAAU,GAAG,KAAK,IAAI;iBAE/B,IAAI,CAAC,KAAG,CAAC,UAAU,GAAG,KAAK,OAAO;QAE1C"}
\ No newline at end of file
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-component/utssdk/app-ios/index.swift.map
浏览文件 @
3c13273a
{"version":3,"sources":["uni_modules/test-component/utssdk/app-ios/index.vue"],"sourcesContent":["\n\n\n\n\n\nimport {\n LottieAnimationView,\n LottieAnimation,\n LottieLoopMode\n} from 'Lottie'\nimport {\n URL\n} from 'Foundation'\nimport {\n UIView\n} from \"UIKit\"\nimport {\n UTSiOS\n} from \"DCloudUTSFoundation\"\n\n\n//原生提供以下属性或方法的实现 \nexport default {\n name: \"animation-view\",\n /**\n * 当播放到末尾时触发 ended 事件(自然播放结束会触发回调,循环播放结束及手动停止动画不会触发)\n */\n emits: ['bindended'],\n props: {\n /**\n * 动画资源地址,目前只支持绝对路径\n */\n \"path\": {\n type: String,\n },\n /**\n * 动画是否循环播放\n */\n \"autoplay\": {\n type: Boolean,\n },\n /**\n * 动画是否自动播放\n */\n \"loop\": {\n type: Boolean,\n },\n /**\n * 是否隐藏动画\n */\n \"hidden\": {\n type: Boolean,\n },\n /**\n * 动画操作,可取值 play、pause、stop\n */\n \"action\": {\n type: String,\n }\n\n },\n data() {\n return {\n animationView: null as LottieAnimationView | null\n }\n },\n watch: {\n\n /// 注意: newValue 都需要强转成对应的类型\n\n \"path\": {\n handler(newValue: string, oldValue: string) {\n this.path = newValue\n if (this.autoplay) {\n this.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"loop\": {\n handler(newValue: boolean, oldValue: boolean) {\n this.loop = newValue\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.loop\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"autoplay\": {\n handler(newValue: boolean, oldValue: boolean) {\n this.autoplay = newValue\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"action\": {\n handler(newValue: string, oldValue: string) {\n const action = newValue\n\n if (action == \"play\" || action == \"pause\" || action == \"stop\") {\n this.action = action\n switch (action) {\n case \"play\":\n this.playAnimation()\n break;\n case \"pause\":\n this.animationView.pause()\n break;\n case \"stop\":\n this.animationView.stop()\n break;\n default:\n break;\n }\n } else {\n // 非法入参,不管\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"hidden\": {\n handler(newValue: boolean, oldValue: boolean) {\n this.hidden = newValue\n this.animationView.isHidden = this.hidden\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n },\n methods: {\n // 需要对外暴露的方法\n // 设置 RepeatMode \n setRepeatMode(repeatMode: string) {\n if (repeatMode == \"RESTART\") {\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.loop\n } else {\n this.animationView.loopMode = LottieLoopMode.playOnce\n }\n } else if (repeatMode == \"REVERSE\") {\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.autoReverse\n } else {\n this.animationView.loopMode = LottieLoopMode.repeatBackwards(1)\n }\n }\n },\n // 不对外暴露的方法\n // 播放动画 \n playAnimation() {\n if (this.path == null) {\n return\n }\n\n // 构建动画资源 url\n var animationUrl: URL | null\n\n if (this.path!.hasPrefix(\"http\")) {\n animationUrl = new URL(string = this.path!)\n } else {\n var filePath = UTSiOS.getResourcePath(this.path!)\n animationUrl = new URL(filePath = filePath)\n }\n\n if (animationUrl != null) {\n // 加载动画 LottieAnimation\n LottieAnimation.loadedFrom(url = animationUrl!, closure = (animation: LottieAnimation): void => {\n if (animation != null) {\n // 加载成功开始播放\n this.animationView.animation = animation\n this.animationView.play(completion = (isFinish: boolean): void => {\n if (isFinish) {\n // 播放完成回调事件\n this.fireEvent(\"bindended\")\n }\n })\n }\n })\n }\n }\n },\n created() { //创建组件,替换created \n\n },\n measure(size: UTSSize): UTSSize { //测量组件大小\n //可选实现,仅当需要原生计算组件大小时需要实现 \n return new UTSSize(100, 100);\n },\n NVBeforeLoad() { //组件将要创建,对应前端beforeMount \n //可选实现,这里可以提前做一些操作 \n },\n NVLoad(): UIView { //创建原生View,必须定义返回值类型(Android需要明确知道View类型,需特殊校验) \n // 初始化 LottieAnimationView\n this.animationView = new LottieAnimationView()\n // 默认只播放一次动画\n this.animationView.loopMode = LottieLoopMode.playOnce\n return this.animationView\n },\n NVLoaded() { //原生View已创建 \n\n /// 更新 props 中定义的属性值\n\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.loop\n }\n\n this.animationView.isHidden = this.hidden\n\n if (this.autoplay) {\n this.playAnimation()\n }\n },\n\n NVLayouted() { //原生View布局完成 \n //可选实现,这里可以做布局后续操作 \n },\n\n NVBeforeUnload() { //原生View将释放 \n //可选实现,这里可以做释放View之前的操作 \n },\n NVUnloaded() { //原生View已释放 \n //可选实现,这里可以做释放View之后的操作 \n },\n NVMeasure(size: UTSSize): UTSSize {\n return UTSSize(100, 100)\n },\n unmounted() { //组件销毁 \n //可选实现 \n }\n}\n\n\n\n\n\n\n\n\n"],"names":[],"mappings":"AAMA,cAIe;AACf,kBAEmB;AACnB,aAEc;AACd,2BAE4B;;;mDA6Kd;qBA9JI;yBAMA;qBAMA;uBAMA;uBAMA;8BAMiB,uBAAR,GAAI;mCAsHjB,CAEV;iCACQ,EAAA,MAAM,OAAO,KAAG,QAAQ;QAE5B,OAAO,AAAI,QAAQ,GAAG,EAAE,GAAG;IAC/B;wCACe,CAEf;qCACU,OAAO;QAEb,IAAI,CAAC,aAAa,GAAG,AAAI;QAEzB,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,QAAQ;QACrD,OAAO,IAAI,CAAC,aAAa;IAC7B;oCACW;QAIP,IAAI,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,IAAI;;QAGrD,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM;QAEzC,IAAI,IAAI,CAAC,QAAQ;YACb,IAAI,CAAC,aAAa;;IAE1B;sCAEa,CAEb;0CAEiB,CAEjB;sCACa,CAEb;mCACU,MAAM,OAAO,KAAG,QAAQ;QAC9B,OAAO,QAAQ,GAAG,EAAE,GAAG;IAC3B;qCACY,CAEZ;8BAhGkB,EAAA,YAAY,MAAM,EAAE;QAC9B,IAAI,cAAc;YACd,IAAI,IAAI,CAAC,IAAI;gBACT,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,IAAI;;gBAEjD,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe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AAI,CAAC,aAAa;gBAEtB,KAAK;oBACD,IAAI,CAAC,aAAa,CAAC,KAAK;gBAE5B,KAAK;oBACD,IAAI,CAAC,aAAa,CAAC,IAAI;gBAE3B;oBACI,KAAM;YACd;QACJ;;;;YAQI;YAAmB;QACvB,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM"}
\ No newline at end of file
{"version":3,"sources":["uni_modules/test-component/utssdk/app-ios/index.vue"],"sourcesContent":["\n\n\n\n\n\nimport {\n LottieAnimationView,\n LottieAnimation,\n LottieLoopMode\n} from 'Lottie'\nimport {\n URL\n} from 'Foundation'\nimport {\n UIView\n} from \"UIKit\"\nimport {\n UTSiOS\n} from \"DCloudUTSFoundation\"\n\n\n//原生提供以下属性或方法的实现 \nexport default {\n name: \"animation-view\",\n /**\n * 当播放到末尾时触发 ended 事件(自然播放结束会触发回调,循环播放结束及手动停止动画不会触发)\n */\n emits: ['bindended'],\n props: {\n /**\n * 动画资源地址,目前只支持绝对路径\n */\n \"path\": {\n type: String,\n },\n /**\n * 动画是否循环播放\n */\n \"autoplay\": {\n type: Boolean,\n },\n /**\n * 动画是否自动播放\n */\n \"loop\": {\n type: Boolean,\n },\n /**\n * 是否隐藏动画\n */\n \"hidden\": {\n type: Boolean,\n },\n /**\n * 动画操作,可取值 play、pause、stop\n */\n \"action\": {\n type: String,\n }\n\n },\n data() {\n return {\n animationView: null as LottieAnimationView | null\n }\n },\n watch: {\n\n /// 注意: newValue 都需要强转成对应的类型\n\n \"path\": {\n handler(newValue: string, oldValue: string) {\n this.path = newValue\n if (this.autoplay) {\n this.playAnimation()\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"loop\": {\n handler(newValue: boolean, oldValue: boolean) {\n this.loop = newValue\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.loop\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"autoplay\": {\n handler(newValue: boolean, oldValue: boolean) {\n this.autoplay = newValue\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n \"action\": {\n handler(newValue: string, oldValue: string) {\n const action = newValue\n\n if (action == \"play\" || action == \"pause\" || action == \"stop\") {\n this.action = action\n switch (action) {\n case \"play\":\n this.playAnimation()\n break;\n case \"pause\":\n this.animationView.pause()\n break;\n case \"stop\":\n this.animationView.stop()\n break;\n default:\n break;\n }\n } else {\n // 非法入参,不管\n }\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n \"hidden\": {\n handler(newValue: boolean, oldValue: boolean) {\n this.hidden = newValue\n this.animationView.isHidden = this.hidden\n },\n immediate: false //创建时是否通过此方法更新属性,默认值为false \n },\n\n },\n methods: {\n // 需要对外暴露的方法\n // 设置 RepeatMode \n setRepeatMode(repeatMode: string) {\n if (repeatMode == \"RESTART\") {\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.loop\n } else {\n this.animationView.loopMode = LottieLoopMode.playOnce\n }\n } else if (repeatMode == \"REVERSE\") {\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.autoReverse\n } else {\n this.animationView.loopMode = LottieLoopMode.repeatBackwards(1)\n }\n }\n },\n // 不对外暴露的方法\n // 播放动画 \n playAnimation() {\n if (this.path == null) {\n return\n }\n\n // 构建动画资源 url\n var animationUrl: URL | null\n\n if (this.path!.hasPrefix(\"http\")) {\n animationUrl = new URL(string = this.path!)\n } else {\n var filePath = UTSiOS.getResourcePath(this.path!)\n animationUrl = new URL(filePath = filePath)\n }\n\n if (animationUrl != null) {\n // 加载动画 LottieAnimation\n LottieAnimation.loadedFrom(url = animationUrl!, closure = (animation: LottieAnimation): void => {\n if (animation != null) {\n // 加载成功开始播放\n this.animationView.animation = animation\n this.animationView.play(completion = (isFinish: boolean): void => {\n if (isFinish) {\n // 播放完成回调事件\n this.fireEvent(\"bindended\")\n }\n })\n }\n })\n }\n }\n },\n created() { //创建组件,替换created \n\n },\n measure(size: UTSSize): UTSSize { //测量组件大小\n //可选实现,仅当需要原生计算组件大小时需要实现 \n return new UTSSize(100, 100);\n },\n NVBeforeLoad() { //组件将要创建,对应前端beforeMount \n //可选实现,这里可以提前做一些操作 \n },\n NVLoad(): UIView { //创建原生View,必须定义返回值类型(Android需要明确知道View类型,需特殊校验) \n // 初始化 LottieAnimationView\n this.animationView = new LottieAnimationView()\n // 默认只播放一次动画\n this.animationView.loopMode = LottieLoopMode.playOnce\n return this.animationView\n },\n NVLoaded() { //原生View已创建 \n\n /// 更新 props 中定义的属性值\n\n if (this.loop) {\n this.animationView.loopMode = LottieLoopMode.loop\n }\n\n this.animationView.isHidden = this.hidden\n\n if (this.autoplay) {\n this.playAnimation()\n }\n },\n\n NVLayouted() { //原生View布局完成 \n //可选实现,这里可以做布局后续操作 \n },\n\n NVBeforeUnload() { //原生View将释放 \n //可选实现,这里可以做释放View之前的操作 \n },\n NVUnloaded() { //原生View已释放 \n //可选实现,这里可以做释放View之后的操作 \n },\n NVMeasure(size: UTSSize): UTSSize {\n return UTSSize(100, 100)\n },\n unmounted() { //组件销毁 \n //可选实现 \n }\n}\n\n\n\n\n\n\n\n\n"],"names":[],"mappings":"AAMA,cAIe;AACf,kBAEmB;AACnB,aAEc;AACd,2BAE4B;;;mDA6Kd;;;;;;8BAhIqB,uBAAR,GAAI;mCAsHjB,CAEV;iCACQ,EAAA,MAAM,OAAO,KAAG,QAAQ;QAE5B,OAAO,AAAI,QAAQ,GAAG,EAAE,GAAG;IAC/B;wCACe,CAEf;qCACU,OAAO;QAEb,IAAI,CAAC,aAAa,GAAG,AAAI;QAEzB,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,QAAQ;QACrD,OAAO,IAAI,CAAC,aAAa;IAC7B;oCACW;QAIP,IAAI,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,IAAI;;QAGrD,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAA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AAG;QACZ,IAAI,IAAI,CAAC,QAAQ;YACb,IAAI,CAAC,aAAa;;;;;YAMlB;YAAmB;QACvB,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,IAAI;;;;;YAMjD;YAAmB;QACvB,IAAI,CAAC,QAAQ,GAAG;;;;YAKZ;YAAkB;QACtB,IAAM,SAAS;QAEf,IAAI,UAAU,UAAU,UAAU,WAAW,UAAU,QAAQ;YAC3D,IAAI,CAAC,MAAM,GAAG;YACd,OAAQ;gBACJ,KAAK;oBACD,IAAI,CAAC,aAAa;gBAEtB,KAAK;oBACD,IAAI,CAAC,aAAa,CAAC,KAAK;gBAE5B,KAAK;oBACD,IAAI,CAAC,aAAa,CAAC,IAAI;gBAE3B;oBACI,KAAM;YACd;QACJ;;;;YAQI;YAAmB;QACvB,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM"}
\ No newline at end of file
packages/uni-automator/lib/uni.plugin.js
浏览文件 @
3c13273a
...
...
@@ -31,13 +31,15 @@ exports.default = [
if
(
platform
===
'
app
'
&&
process
.
env
.
UNI_APP_X
===
'
true
'
)
{
const
automatorPath
=
(
0
,
uni_cli_shared_1
.
normalizePath
)((
0
,
uni_cli_shared_1
.
resolveBuiltIn
)(
`@dcloudio/uni-app-uts/lib/automator/index.uts`
));
return
{
code
:
code
+
`;import { initAutomator } from '
${
automatorPath
}
';`
,
code
:
// 增加个换行,避免最后是注释且无换行
code
+
`;\nimport { initAutomator } from '
${
automatorPath
}
';`
,
map
:
null
,
};
}
const
automatorPath
=
(
0
,
uni_cli_shared_1
.
normalizePath
)((
0
,
uni_cli_shared_1
.
resolveBuiltIn
)(
`@dcloudio/uni-
${
platform
===
'
app
'
?
'
app-plus
'
:
platform
}
/lib/automator.js`
));
return
{
code
:
code
+
`;import '
${
automatorPath
}
';`
,
code
:
code
+
`;
\n
import '
${
automatorPath
}
';`
,
map
:
null
,
};
}
...
...
packages/uni-cloud/lib/uni.plugin.js
浏览文件 @
3c13273a
...
...
@@ -161,7 +161,7 @@ exports.default = () => [
}
if
(
uniCloudSpaces
.
length
)
{
return
{
code
:
code
+
`;import '@dcloudio/uni-cloud';`
,
code
:
code
+
`;
\n
import '@dcloudio/uni-cloud';`
,
map
:
null
,
};
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录