@dolphinweex/weex-harmony-transform 0.1.28 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/adapter.js +9 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolphinweex/weex-harmony-transform",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "weex harmony adapter",
5
5
  "main": "index.js",
6
6
  "files": [
package/src/adapter.js CHANGED
@@ -543,16 +543,18 @@ let stream = {
543
543
 
544
544
  let lottieModule = {
545
545
  name: "lottieModule",
546
- lottieInterface: function (name, param, successfulFn, errorFn) {
547
- weexModule.callNative(`lottieModule.lottieInterface`, {
548
- 'options': {
549
- name: 'lottieView',
550
- param,
551
- }
552
- }, undefined, successfulFn, errorFn);
546
+ lottieInterface: function (name, options, callback, failCallback) {
547
+ // 通过类名获取子元素
548
+ let childId = null
549
+ if (name) {
550
+ const childElement = name.$el.querySelector('embed');
551
+ childId = childElement.id ;
552
+ }
553
553
 
554
+ weexModule.callNative(`lottieModule.lottieInterface`, { 'options': { options, embedId: childId || 0 } }, callback, undefined, failCallback);
554
555
  },
555
556
  }
557
+
556
558
  let event = {
557
559
  name: "event 模块",
558
560