@dolphinweex/weex-harmony 0.1.10 → 0.1.12
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
@@ -0,0 +1,111 @@
|
|
1
|
+
<template>
|
2
|
+
<BaseSameLayer :hosSameLayerArgs="hosSameLayerArgs" embedType="native/midea-scene-card-drag-list-view" :defaultWidth="300"
|
3
|
+
:defaultHeight="300" ref="sceneCardRed"></BaseSameLayer>
|
4
|
+
</template>
|
5
|
+
|
6
|
+
<script>
|
7
|
+
import BaseSameLayer from "./baseSameLayer.vue";
|
8
|
+
const weexModule = weex.requireModule('weexModule');
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "mideaSceneCardDragListView",
|
12
|
+
data() {
|
13
|
+
return {
|
14
|
+
width: 0,
|
15
|
+
height: 0
|
16
|
+
}
|
17
|
+
},
|
18
|
+
components: {
|
19
|
+
BaseSameLayer,
|
20
|
+
},
|
21
|
+
props: {
|
22
|
+
hosUniqueProps: {
|
23
|
+
type: Object,
|
24
|
+
default() {
|
25
|
+
return {};
|
26
|
+
},
|
27
|
+
},
|
28
|
+
data: {
|
29
|
+
type: Object,
|
30
|
+
default() {
|
31
|
+
return {
|
32
|
+
embedId: ''
|
33
|
+
};
|
34
|
+
},
|
35
|
+
},
|
36
|
+
},
|
37
|
+
computed: {
|
38
|
+
hosSameLayerArgs() {
|
39
|
+
return {
|
40
|
+
...this.hosUniqueProps, // 鸿蒙原生组件独有属性
|
41
|
+
width: this.width,
|
42
|
+
height: this.height,
|
43
|
+
data: this.data,
|
44
|
+
updateListItem: this.updateListItem,
|
45
|
+
getListData: this.getListData,
|
46
|
+
onClickRightIcon: this.onClickRightIcon,
|
47
|
+
onClickActionButton: this.onClickActionButton,
|
48
|
+
onEditStateChanged: this.onEditStateChanged,
|
49
|
+
onClickItem: this.onClickItem,
|
50
|
+
onSelectItems: this.onSelectItems,
|
51
|
+
onDragEventStart: this.onDragEventStart,
|
52
|
+
onDragEventEnd: this.onDragEventEnd,
|
53
|
+
};
|
54
|
+
},
|
55
|
+
},
|
56
|
+
mounted() {
|
57
|
+
this.width = this.$el.clientWidth;
|
58
|
+
this.height = this.$el.clientHeight;
|
59
|
+
this.embedId = this.$refs.sceneCardRed.embedId;
|
60
|
+
},
|
61
|
+
|
62
|
+
methods: {
|
63
|
+
getListData(callback,callback) {
|
64
|
+
weexModule.callNative(
|
65
|
+
'sceneCardListHandle',
|
66
|
+
{
|
67
|
+
method: 'getListData',
|
68
|
+
name: this.embedId,
|
69
|
+
},
|
70
|
+
callback,
|
71
|
+
callback
|
72
|
+
);
|
73
|
+
},
|
74
|
+
updateListItem(item) {
|
75
|
+
weexModule.callNative(
|
76
|
+
'sceneCardListHandle',
|
77
|
+
{
|
78
|
+
method: 'updateListItem',
|
79
|
+
name: this.embedId,
|
80
|
+
item
|
81
|
+
},
|
82
|
+
);
|
83
|
+
},
|
84
|
+
onClickRightIcon(event) { //点击右侧icon
|
85
|
+
this.$emit('onClickRightIcon', event)
|
86
|
+
},
|
87
|
+
|
88
|
+
onClickActionButton(event) { //点击执行按钮
|
89
|
+
this.$emit('onClickActionButton', event)
|
90
|
+
},
|
91
|
+
|
92
|
+
onEditStateChanged(event) { //切换编辑状态
|
93
|
+
this.$emit('onEditStateChanged', event)
|
94
|
+
},
|
95
|
+
|
96
|
+
onClickItem(event) { //点击item
|
97
|
+
this.$emit('onClickItem', event)
|
98
|
+
},
|
99
|
+
|
100
|
+
onSelectItems(event) { //是编辑状态下,选中的 item的 id 数组 返回的是ids":["21675327"]
|
101
|
+
this.$emit('onSelectItems', event)
|
102
|
+
},
|
103
|
+
onDragEventStart(event) {
|
104
|
+
this.$emit('onDragEventStart', event)
|
105
|
+
},
|
106
|
+
onDragEventEnd(event) {
|
107
|
+
this.$emit('onDragEventEnd', event)
|
108
|
+
}
|
109
|
+
},
|
110
|
+
};
|
111
|
+
</script>
|
@@ -41,6 +41,22 @@ export default {
|
|
41
41
|
type: String,
|
42
42
|
default: "",
|
43
43
|
},
|
44
|
+
controls: {
|
45
|
+
type: Boolean,
|
46
|
+
default: true,
|
47
|
+
},
|
48
|
+
objectFit: {
|
49
|
+
type: String,
|
50
|
+
default: "",
|
51
|
+
},
|
52
|
+
muted: {
|
53
|
+
type: Boolean,
|
54
|
+
default: false,
|
55
|
+
},
|
56
|
+
videoCover: {
|
57
|
+
type: String,
|
58
|
+
default: "",
|
59
|
+
},
|
44
60
|
},
|
45
61
|
computed: {
|
46
62
|
hosSameLayerArgs() {
|
@@ -51,10 +67,14 @@ export default {
|
|
51
67
|
autoplay: this.autoplay,
|
52
68
|
src: this.src,
|
53
69
|
videoCover: this.videoCover,
|
70
|
+
controls:this.controls,
|
54
71
|
start: this.start,
|
55
72
|
pause: this.pause,
|
56
73
|
fail: this.fail,
|
57
74
|
finish: this.finish,
|
75
|
+
objectFit: this.objectFit,
|
76
|
+
muted: this.muted,
|
77
|
+
videoCover: this.videoCover,
|
58
78
|
};
|
59
79
|
},
|
60
80
|
},
|
package/src/index.js
CHANGED
@@ -190,6 +190,11 @@ const componentMap = [
|
|
190
190
|
componentAddress: 'midea-villa-card-view.vue',
|
191
191
|
isInPlugin: false
|
192
192
|
},
|
193
|
+
{
|
194
|
+
componentName: 'mideaSceneCardDragListView',
|
195
|
+
componentAddress: 'midea-scene-card-drag-list-view.vue',
|
196
|
+
isInPlugin: false
|
197
|
+
},
|
193
198
|
|
194
199
|
]
|
195
200
|
|