@dolphinweex/weex-harmony 0.1.39 → 0.1.40
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
package/src/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -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>
|