@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolphinweex/weex-harmony",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "weex harmony adapter",
5
5
  "main": "index.js",
6
6
  "files": [
package/src/.DS_Store ADDED
Binary file
Binary file
@@ -1,66 +1,65 @@
1
1
  <template>
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: {
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
- 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
- };
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
- methods: {
55
- // 自定义拓展其它逻辑
56
- handleOnChange(res) {
57
- if (res.mode == 1) { //停止滑动
58
- this.$emit("endProgress", res);
59
- } else {
60
- this.$emit("onProgress", res);
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
- </script>
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.draggingIndex !== null) {
414
+ return;
415
+ }
413
416
  console.log('itemViewClick');
414
417
  if (this.data.isEditing) {
415
418
  if (item.selectIcon.visibility) {