@dolphinweex/weex-harmony 0.1.82 → 0.1.83

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.82",
3
+ "version": "0.1.83",
4
4
  "description": "weex harmony adapter",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -40,6 +40,7 @@ export default {
40
40
  embedId: `embedId_iframe_${
41
41
  Date.now().toString(36) + Math.random().toString(36).substring(2)
42
42
  }`,
43
+ isPluginMenu: window.location.href.includes('plugin-menu'),
43
44
  height: window.location.href.includes('plugin-menu') ? '0px' : '100%',
44
45
  _resizeObserver: null,
45
46
  _heightCheckTimer: null,
@@ -364,7 +365,7 @@ export default {
364
365
  maxHeight = Math.max(maxHeight, 0);
365
366
 
366
367
  // 如果计算出的高度超过了最大限制,则使用最大限制
367
- const finalHeight = elementHeight > maxHeight ? maxHeight : elementHeight;
368
+ const finalHeight = !this.isPluginMenu ? elementHeight > maxHeight ? maxHeight : elementHeight : elementHeight
368
369
 
369
370
  // 更新包装器高度
370
371
  if (this._wrapperEl) {
@@ -4,6 +4,7 @@
4
4
  embedType="native/midea-progresscycle-view"
5
5
  :defaultWidth="300"
6
6
  :defaultHeight="300"
7
+ :key="dataVersion"
7
8
  ></BaseSameLayer>
8
9
  </template>
9
10
 
@@ -15,7 +16,8 @@ export default {
15
16
  data() {
16
17
  return {
17
18
  width: 0,
18
- height: 0
19
+ height: 0,
20
+ dataVersion: 0
19
21
  }
20
22
  },
21
23
  components: {
@@ -37,13 +39,28 @@ export default {
37
39
  },
38
40
  computed: {
39
41
  hosSameLayerArgs() {
40
- return {
42
+ const result = {
41
43
  ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
42
44
  width: this.width,
43
45
  height: this.height,
44
- data: this.data,
46
+ data: this.data,
45
47
  handleProgresscycleTap: this.handleProgresscycleTap,
46
48
  };
49
+ return result;
50
+ },
51
+ },
52
+ watch: {
53
+ // 深度监听 data 对象的变化
54
+ data: {
55
+ handler(newVal, oldVal) {
56
+ const newStr = JSON.stringify(newVal);
57
+ const oldStr = JSON.stringify(oldVal);
58
+ if (newStr !== oldStr) {
59
+ this.dataVersion++;
60
+ }
61
+ },
62
+ deep: true,
63
+ immediate: false
47
64
  },
48
65
  },
49
66
  mounted() {