@dolphinweex/weex-harmony-transform 0.1.29 → 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 -2
package/package.json
CHANGED
package/src/adapter.js
CHANGED
|
@@ -543,8 +543,15 @@ let stream = {
|
|
|
543
543
|
|
|
544
544
|
let lottieModule = {
|
|
545
545
|
name: "lottieModule",
|
|
546
|
-
lottieInterface: function (name, options, callback,failCallback) {
|
|
547
|
-
|
|
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
|
+
|
|
554
|
+
weexModule.callNative(`lottieModule.lottieInterface`, { 'options': { options, embedId: childId || 0 } }, callback, undefined, failCallback);
|
|
548
555
|
},
|
|
549
556
|
}
|
|
550
557
|
|