@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.
- package/package.json +1 -1
- package/src/adapter.js +9 -7
package/package.json
CHANGED
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,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
}
|
|
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
|
|