@dolphinweex/weex-harmony 0.1.61 → 0.1.63

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolphinweex/weex-harmony",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "description": "weex harmony adapter",
5
5
  "main": "index.js",
6
6
  "files": [
package/src/.DS_Store ADDED
Binary file
Binary file
@@ -2,7 +2,6 @@
2
2
  <div>
3
3
  <!-- <text v-if="progressText.length > 0">{{progressText}}</text> -->
4
4
  <iframe
5
- class="common-view-iframe"
6
5
  :id="embedId"
7
6
  v-if="url.length > 0 && pluginType != 'old-h5'"
8
7
  :src="url"
@@ -124,14 +123,19 @@ export default {
124
123
  };
125
124
  this._wrapperEl = findWrapperFromParent(); // 保存容器引用
126
125
  this._onMessage = (event) => {
127
- const h = Number(event.data.height) || 0;
128
- if (!h) {
129
- return;
130
- }
131
- if (this._wrapperEl) {
132
- this._wrapperEl.style.height = `${h}px`;
126
+ if(event.data.type==='IFRAME_CONTENT_HEIGHT'){
127
+ const h = Number(event.data.height) || 0;
128
+ if (!h) {
129
+ return;
130
+ }
131
+ if (this._wrapperEl) {
132
+ this._wrapperEl.style.height = `${h}px`;
133
+ }
134
+ this.height = `${h / weex.config.env.scale}px`;
135
+ return
136
+ }else{
137
+ document.getElementsByTagName('iframe')[0].height = event.data.height
133
138
  }
134
- this.height = `${h / weex.config.env.scale}px`;
135
139
  };
136
140
  window.addEventListener("message", this._onMessage, false);
137
141
  },
@@ -152,7 +156,5 @@ export default {
152
156
  </script>
153
157
 
154
158
  <style scoped>
155
- .common-view-iframe {
156
- height: 100%;
157
- }
159
+
158
160
  </style>
@@ -49,13 +49,13 @@ export default {
49
49
  type: Boolean,
50
50
  default: false,
51
51
  },
52
- videoCover: {
53
- type: String,
54
- default: "",
55
- },
56
52
  loop: {
57
53
  type: Boolean,
58
54
  default: false,
55
+ },
56
+ playStatus:{
57
+ type: String,
58
+ default: "",
59
59
  }
60
60
  },
61
61
  computed: {
@@ -74,8 +74,9 @@ export default {
74
74
  finish: this.finish,
75
75
  objectFit: this.objectFit,
76
76
  muted: this.muted,
77
- videoCover: this.videoCover,
78
- loop: this.loop
77
+ loop: this.loop,
78
+ appear: this.appear,
79
+ playStatus: this.playStatus
79
80
  };
80
81
  },
81
82
  },
@@ -107,6 +108,9 @@ export default {
107
108
  finish(event) {
108
109
  this.$emit("finish", event || {});
109
110
  },
111
+ appear(event) {
112
+ this.$emit("appear", event || {});
113
+ },
110
114
  },
111
115
  };
112
116
  </script>