@dolphinweex/weex-vue-render 0.2.22 → 0.2.24
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/dist/index.common.js +10 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -5907,6 +5907,7 @@ var scrollable$1 = {
|
|
|
5907
5907
|
},
|
|
5908
5908
|
|
|
5909
5909
|
handleScroll: function handleScroll (event) {
|
|
5910
|
+
event.stopImmediatePropagation();
|
|
5910
5911
|
weex.utils.getThrottleLazyload(25, this.$el, 'scroll')();
|
|
5911
5912
|
getThrottledScroll(this)(event);
|
|
5912
5913
|
|
|
@@ -8810,6 +8811,7 @@ function getWeb (weex) {
|
|
|
8810
8811
|
var this$1 = this;
|
|
8811
8812
|
|
|
8812
8813
|
return createElement('iframe', {
|
|
8814
|
+
ref: 'childIframe',
|
|
8813
8815
|
attrs: {
|
|
8814
8816
|
'weex-type': 'web',
|
|
8815
8817
|
src: this.currentSrc
|
|
@@ -8830,8 +8832,15 @@ function getWeb (weex) {
|
|
|
8830
8832
|
catch (err) {
|
|
8831
8833
|
dispatchNativeEvent(el, 'error', err);
|
|
8832
8834
|
}
|
|
8835
|
+
|
|
8836
|
+
window.addEventListener('message', function(event){
|
|
8837
|
+
if (event.source === this.$refs.childIframe.contentWindow) {
|
|
8838
|
+
// 处理接收到的消息
|
|
8839
|
+
dispatchNativeEvent(el, 'message', event.data);
|
|
8840
|
+
}
|
|
8841
|
+
}, false);
|
|
8833
8842
|
});
|
|
8834
|
-
}
|
|
8843
|
+
},
|
|
8835
8844
|
},
|
|
8836
8845
|
staticClass: 'weex-web weex-el',
|
|
8837
8846
|
staticStyle: extractComponentStyle(this)
|
package/package.json
CHANGED