@dolphinweex/weex-harmony 0.1.39 → 0.1.41
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,66 +1,65 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
type: Object,
|
27
|
-
default() {
|
28
|
-
return {};
|
29
|
-
},
|
30
|
-
},
|
31
|
-
data: {
|
2
|
+
<BaseSameLayer
|
3
|
+
:hosSameLayerArgs="hosSameLayerArgs"
|
4
|
+
embedType="native/midea-drag-slider"
|
5
|
+
:defaultWidth="300"
|
6
|
+
:defaultHeight="40"
|
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: "MideaDragSlider",
|
21
|
+
components: {
|
22
|
+
BaseSameLayer,
|
23
|
+
},
|
24
|
+
props: {
|
25
|
+
hosUniqueProps: {
|
32
26
|
type: Object,
|
33
27
|
default() {
|
34
28
|
return {};
|
35
29
|
},
|
36
30
|
},
|
31
|
+
data: {
|
32
|
+
type: Object,
|
33
|
+
default() {
|
34
|
+
return {};
|
37
35
|
},
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
mounted() {
|
50
|
-
this.width = this.$el.clientWidth;
|
51
|
-
this.height = this.$el.clientHeight;
|
36
|
+
},
|
37
|
+
},
|
38
|
+
computed: {
|
39
|
+
hosSameLayerArgs() {
|
40
|
+
return {
|
41
|
+
...this.hosUniqueProps, // 鸿蒙原生组件独有属性
|
42
|
+
width: this.width,
|
43
|
+
height: this.height,
|
44
|
+
data: this.data,
|
45
|
+
handleOnChange: this.handleOnChange,
|
46
|
+
};
|
52
47
|
},
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
48
|
+
},
|
49
|
+
mounted() {
|
50
|
+
this.width = this.$el.clientWidth;
|
51
|
+
this.height = this.$el.clientHeight;
|
52
|
+
},
|
53
|
+
|
54
|
+
methods: {
|
55
|
+
// 自定义拓展其它逻辑
|
56
|
+
handleOnChange(res) {
|
57
|
+
if (res.mode == 2) { //停止滑动
|
58
|
+
this.$emit("endProgress", res);
|
59
|
+
} else {
|
60
|
+
this.$emit("onProgress", res);
|
61
|
+
}
|
63
62
|
},
|
64
|
-
}
|
65
|
-
|
66
|
-
|
63
|
+
},
|
64
|
+
};
|
65
|
+
</script>
|
@@ -42,7 +42,8 @@ export default {
|
|
42
42
|
width: this.width,
|
43
43
|
height: this.height,
|
44
44
|
data: this.data,
|
45
|
-
handleOnLineDrag: this.handleOnLineDrag
|
45
|
+
handleOnLineDrag: this.handleOnLineDrag,
|
46
|
+
handleNotDrag: this.handleNotDrag
|
46
47
|
};
|
47
48
|
},
|
48
49
|
},
|
@@ -55,6 +56,9 @@ export default {
|
|
55
56
|
handleOnLineDrag(res) {
|
56
57
|
this.$emit('onLineDrag', res);
|
57
58
|
},
|
59
|
+
handleNotDrag(res) {
|
60
|
+
this.$emit('notDrag', res);
|
61
|
+
},
|
58
62
|
},
|
59
63
|
};
|
60
64
|
</script>
|
@@ -410,6 +410,9 @@ export default {
|
|
410
410
|
},
|
411
411
|
|
412
412
|
itemViewClick(e, item, index) {
|
413
|
+
if (this.isTouchDragging || this.longPressTimer === null && this.data.isEditing) {
|
414
|
+
return;
|
415
|
+
}
|
413
416
|
console.log('itemViewClick');
|
414
417
|
if (this.data.isEditing) {
|
415
418
|
if (item.selectIcon.visibility) {
|
@@ -1,136 +1,140 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
<BaseSameLayer
|
3
|
+
:hosSameLayerArgs="hosSameLayerArgs"
|
4
|
+
embedType="native/midea-seek-bar"
|
5
|
+
:defaultWidth="300"
|
6
|
+
:defaultHeight="40"
|
7
|
+
></BaseSameLayer>
|
8
8
|
</template>
|
9
|
-
|
9
|
+
|
10
10
|
<script>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
import BaseSameLayer from "./baseSameLayer.vue";
|
12
|
+
|
13
|
+
export default {
|
14
|
+
data() {
|
15
|
+
return {
|
16
|
+
width: 0,
|
17
|
+
height: 0
|
18
|
+
}
|
19
|
+
},
|
20
|
+
name: "MideaSeekBar",
|
21
|
+
components: {
|
22
|
+
BaseSameLayer,
|
23
|
+
},
|
24
|
+
props: {
|
25
|
+
hosUniqueProps: {
|
26
|
+
type: Object,
|
27
|
+
default() {
|
28
|
+
return {};
|
29
|
+
},
|
19
30
|
},
|
20
|
-
|
21
|
-
|
22
|
-
|
31
|
+
min: {
|
32
|
+
type: Number,
|
33
|
+
required: true,
|
23
34
|
},
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
default() {
|
28
|
-
return {};
|
29
|
-
},
|
30
|
-
},
|
31
|
-
min: {
|
32
|
-
type: Number,
|
33
|
-
required: true,
|
34
|
-
},
|
35
|
-
max: {
|
36
|
-
type: Number,
|
37
|
-
required: true,
|
38
|
-
},
|
39
|
-
value: {
|
40
|
-
type: Number,
|
41
|
-
required: false,
|
42
|
-
},
|
43
|
-
unit: {
|
44
|
-
type: String,
|
45
|
-
required: false,
|
46
|
-
},
|
47
|
-
step: {
|
48
|
-
type: Number,
|
49
|
-
required: false,
|
50
|
-
},
|
51
|
-
showTip: {
|
52
|
-
type: Boolean,
|
53
|
-
required: false,
|
54
|
-
},
|
55
|
-
axisH: {
|
56
|
-
type: Number,
|
57
|
-
required: false,
|
58
|
-
},
|
59
|
-
pointH: {
|
60
|
-
type: Number,
|
61
|
-
required: false,
|
62
|
-
},
|
63
|
-
pointColor: {
|
64
|
-
type: String,
|
65
|
-
required: false,
|
66
|
-
},
|
67
|
-
axisColor: {
|
68
|
-
type: String,
|
69
|
-
required: false,
|
70
|
-
},
|
71
|
-
axisStartColor: {
|
72
|
-
type: String,
|
73
|
-
required: false,
|
74
|
-
},
|
75
|
-
axisEndColor: {
|
76
|
-
type: String,
|
77
|
-
required: false,
|
78
|
-
},
|
79
|
-
axisBgColor: {
|
80
|
-
type: String,
|
81
|
-
required: false,
|
82
|
-
},
|
83
|
-
disable: {
|
84
|
-
type: Boolean,
|
85
|
-
required: false,
|
86
|
-
},
|
87
|
-
sliderImage: {
|
88
|
-
type: String,
|
89
|
-
required: false,
|
90
|
-
},
|
35
|
+
max: {
|
36
|
+
type: Number,
|
37
|
+
required: true,
|
91
38
|
},
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
...this.hosUniqueProps, // 鸿蒙原生组件独有属性
|
96
|
-
width: this.width,
|
97
|
-
height: this.height,
|
98
|
-
min: this.min,
|
99
|
-
max: this.max,
|
100
|
-
value: this.value,
|
101
|
-
unit: this.unit,
|
102
|
-
step: this.step,
|
103
|
-
showTip: this.showTip,
|
104
|
-
axisH: this.axisH,
|
105
|
-
pointH: this.pointH,
|
106
|
-
pointColor: this.pointColor,
|
107
|
-
axisColor: this.axisColor,
|
108
|
-
axisStartColor: this.axisStartColor,
|
109
|
-
axisEndColor: this.axisEndColor,
|
110
|
-
axisBgColor: this.axisBgColor,
|
111
|
-
disable: this.disable,
|
112
|
-
sliderImage: this.sliderImage,
|
113
|
-
handleOnChange: this.handleOnChange,
|
114
|
-
};
|
115
|
-
},
|
39
|
+
value: {
|
40
|
+
type: Number,
|
41
|
+
required: false,
|
116
42
|
},
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
},
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
43
|
+
unit: {
|
44
|
+
type: String,
|
45
|
+
required: false,
|
46
|
+
},
|
47
|
+
step: {
|
48
|
+
type: Number,
|
49
|
+
required: false,
|
50
|
+
},
|
51
|
+
showTip: {
|
52
|
+
type: Boolean,
|
53
|
+
required: false,
|
54
|
+
},
|
55
|
+
axisH: {
|
56
|
+
type: Number,
|
57
|
+
required: false,
|
58
|
+
},
|
59
|
+
pointH: {
|
60
|
+
type: Number,
|
61
|
+
required: false,
|
62
|
+
},
|
63
|
+
pointColor: {
|
64
|
+
type: String,
|
65
|
+
required: false,
|
66
|
+
},
|
67
|
+
axisColor: {
|
68
|
+
type: String,
|
69
|
+
required: false,
|
70
|
+
},
|
71
|
+
axisStartColor: {
|
72
|
+
type: String,
|
73
|
+
required: false,
|
74
|
+
},
|
75
|
+
axisEndColor: {
|
76
|
+
type: String,
|
77
|
+
required: false,
|
78
|
+
},
|
79
|
+
axisBgColor: {
|
80
|
+
type: String,
|
81
|
+
required: false,
|
82
|
+
},
|
83
|
+
disable: {
|
84
|
+
type: Boolean,
|
85
|
+
required: false,
|
86
|
+
},
|
87
|
+
sliderImage: {
|
88
|
+
type: String,
|
89
|
+
required: false,
|
90
|
+
},
|
91
|
+
rotate:{
|
92
|
+
type: Object,
|
93
|
+
default:()=>{}
|
94
|
+
}
|
95
|
+
},
|
96
|
+
computed: {
|
97
|
+
hosSameLayerArgs() {
|
98
|
+
return {
|
99
|
+
...this.hosUniqueProps, // 鸿蒙原生组件独有属性
|
100
|
+
width: this.width,
|
101
|
+
height: this.height,
|
102
|
+
min: this.min,
|
103
|
+
max: this.max,
|
104
|
+
value: this.value,
|
105
|
+
unit: this.unit,
|
106
|
+
step: this.step,
|
107
|
+
showTip: this.showTip,
|
108
|
+
axisH: this.axisH,
|
109
|
+
pointH: this.pointH,
|
110
|
+
pointColor: this.pointColor,
|
111
|
+
axisColor: this.axisColor,
|
112
|
+
axisStartColor: this.axisStartColor,
|
113
|
+
axisEndColor: this.axisEndColor,
|
114
|
+
axisBgColor: this.axisBgColor,
|
115
|
+
disable: this.disable,
|
116
|
+
sliderImage: this.sliderImage,
|
117
|
+
handleOnChange: this.handleOnChange,
|
118
|
+
rotate: this.rotate
|
119
|
+
};
|
120
|
+
},
|
121
|
+
},
|
122
|
+
mounted() {
|
123
|
+
this.width = this.$el.clientWidth;
|
124
|
+
this.height = this.$el.clientHeight;
|
125
|
+
},
|
126
|
+
|
127
|
+
methods: {
|
128
|
+
// 自定义拓展其它逻辑
|
129
|
+
handleOnChange(res) {
|
130
|
+
if (res.mode == 2) { //停止滑动
|
131
|
+
this.$emit("stopChange", res);
|
132
|
+
this.$emit("slideEnd", res);
|
133
|
+
} else {
|
134
|
+
this.$emit("change", res);
|
135
|
+
this.$emit("slideChange", res);
|
136
|
+
}
|
133
137
|
},
|
134
|
-
}
|
135
|
-
|
136
|
-
|
138
|
+
},
|
139
|
+
};
|
140
|
+
</script>
|