@dolphinweex/weex-harmony 0.1.17 → 0.1.19
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
@@ -64,12 +64,10 @@ export default {
|
|
64
64
|
return filtered;
|
65
65
|
},
|
66
66
|
embedWidth() {
|
67
|
-
this.$forceUpdate()
|
68
67
|
// 如果hosSameLayerArgs.width存在且定义了,则使用该值,否则使用defaultWidth
|
69
68
|
return this.hosSameLayerArgs.width || this.defaultWidth;
|
70
69
|
},
|
71
70
|
embedHeight() {
|
72
|
-
this.$forceUpdate()
|
73
71
|
// 如果hosSameLayerArgs.height存在且定义了,则使用该值,否则使用defaultHeight
|
74
72
|
return this.hosSameLayerArgs.height || this.defaultHeight;
|
75
73
|
},
|
@@ -147,9 +145,11 @@ export default {
|
|
147
145
|
deep: true,
|
148
146
|
handler: function (newVal, oldVal) {
|
149
147
|
console.log("[sameLayerRendering] web component update.");
|
150
|
-
|
151
|
-
|
152
|
-
|
148
|
+
this.$nextTick(() => {
|
149
|
+
weexModule.callNative("transferSameLayerArgs", {
|
150
|
+
componentId: this.embedId,
|
151
|
+
...newVal,
|
152
|
+
});
|
153
153
|
});
|
154
154
|
},
|
155
155
|
},
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<template>
|
2
|
+
<BaseSameLayer
|
3
|
+
:hosSameLayerArgs="hosSameLayerArgs"
|
4
|
+
embedType="native/midea-device-card-list-view"
|
5
|
+
:defaultWidth="100"
|
6
|
+
:defaultHeight="100"
|
7
|
+
></BaseSameLayer>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
import BaseSameLayer from './baseSameLayer.vue';
|
12
|
+
|
13
|
+
export default {
|
14
|
+
data() {
|
15
|
+
return {
|
16
|
+
width: 0,
|
17
|
+
height: 0,
|
18
|
+
};
|
19
|
+
},
|
20
|
+
name: 'MideaDeviceCardListView',
|
21
|
+
components: {
|
22
|
+
BaseSameLayer,
|
23
|
+
},
|
24
|
+
props: {
|
25
|
+
hosUniqueProps: {
|
26
|
+
type: Object,
|
27
|
+
default() {
|
28
|
+
return {};
|
29
|
+
},
|
30
|
+
},
|
31
|
+
data: {
|
32
|
+
type: Object,
|
33
|
+
default() {
|
34
|
+
return {};
|
35
|
+
},
|
36
|
+
},
|
37
|
+
harmonyStyle: {
|
38
|
+
type: Object,
|
39
|
+
required: false,
|
40
|
+
}
|
41
|
+
},
|
42
|
+
computed: {
|
43
|
+
hosSameLayerArgs() {
|
44
|
+
return {
|
45
|
+
...this.hosUniqueProps, // 鸿蒙原生组件独有属性
|
46
|
+
width: this.width,
|
47
|
+
height: (this.harmonyStyle && this.harmonyStyle.height) ? this.harmonyStyle.height : this.height,
|
48
|
+
data: this.data,
|
49
|
+
loadComplete: this.loadComplete,
|
50
|
+
};
|
51
|
+
},
|
52
|
+
},
|
53
|
+
mounted() {
|
54
|
+
this.width = this.$el.clientWidth;
|
55
|
+
this.height = this.$el.clientHeight;
|
56
|
+
},
|
57
|
+
methods: {
|
58
|
+
loadComplete(res) {
|
59
|
+
this.$emit("loadComplete", res)
|
60
|
+
},
|
61
|
+
},
|
62
|
+
};
|
63
|
+
</script>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<BaseSameLayer :hosSameLayerArgs="hosSameLayerArgs" embedType="native/midea-scene-card-drag-list-view"
|
3
|
-
:defaultHeight="300" ref="sceneCardRed"></BaseSameLayer>
|
2
|
+
<BaseSameLayer :hosSameLayerArgs="hosSameLayerArgs" embedType="native/midea-scene-card-drag-list-view" ref="sceneCardRed"></BaseSameLayer>
|
4
3
|
</template>
|
5
4
|
|
6
5
|
<script>
|
package/src/index.js
CHANGED
@@ -195,7 +195,11 @@ const componentMap = [
|
|
195
195
|
componentAddress: 'midea-scene-card-drag-list-view.vue',
|
196
196
|
isInPlugin: false
|
197
197
|
},
|
198
|
-
|
198
|
+
{
|
199
|
+
componentName: 'MideaDeviceCardListView',
|
200
|
+
componentAddress: 'midea-device-card-list-view.vue',
|
201
|
+
isInPlugin: false
|
202
|
+
},
|
199
203
|
]
|
200
204
|
|
201
205
|
module.exports = componentMap
|