@dolphinweex/weex-harmony 0.1.0

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.
Files changed (48) hide show
  1. package/README.md +13 -0
  2. package/index.js +2 -0
  3. package/package.json +37 -0
  4. package/src/components/baseSameLayer.vue +101 -0
  5. package/src/components/drag-vertical-list-view.vue +86 -0
  6. package/src/components/hl-button-base.vue +66 -0
  7. package/src/components/hl-button.vue +115 -0
  8. package/src/components/hl-image-base.vue +53 -0
  9. package/src/components/hl-image.vue +151 -0
  10. package/src/components/hl-lottie-base.vue +151 -0
  11. package/src/components/hl-lottie.vue +214 -0
  12. package/src/components/hl-richtext-base.vue +40 -0
  13. package/src/components/hl-richtext.vue +118 -0
  14. package/src/components/hl-slider-base.vue +75 -0
  15. package/src/components/hl-slider.vue +126 -0
  16. package/src/components/hl-textarea-base.vue +40 -0
  17. package/src/components/hl-textarea.vue +118 -0
  18. package/src/components/hl-video-base.vue +65 -0
  19. package/src/components/hl-video.vue +148 -0
  20. package/src/components/hl-web-base.vue +85 -0
  21. package/src/components/mdiea-arc-slider.vue +75 -0
  22. package/src/components/midea-apng-view-base.vue +111 -0
  23. package/src/components/midea-barchart-view.vue +56 -0
  24. package/src/components/midea-blur-view.vue +57 -0
  25. package/src/components/midea-calendar-pave.vue +64 -0
  26. package/src/components/midea-camera-view.vue +91 -0
  27. package/src/components/midea-circle-progress.vue +56 -0
  28. package/src/components/midea-combinechart-view.vue +56 -0
  29. package/src/components/midea-common-weex-view.vue +55 -0
  30. package/src/components/midea-drag-list-view.vue +89 -0
  31. package/src/components/midea-drag-slider-base.vue +66 -0
  32. package/src/components/midea-dragging-linechart-view.vue +56 -0
  33. package/src/components/midea-gesture-password-base.vue +63 -0
  34. package/src/components/midea-ijkplayer-view.vue +93 -0
  35. package/src/components/midea-linechart-view.vue +56 -0
  36. package/src/components/midea-lottie-view.vue +69 -0
  37. package/src/components/midea-map-view.vue +74 -0
  38. package/src/components/midea-pdf-view-base.vue +75 -0
  39. package/src/components/midea-picker.vue +58 -0
  40. package/src/components/midea-piechart-view.vue +56 -0
  41. package/src/components/midea-progresscycle-view.vue +56 -0
  42. package/src/components/midea-seek-bar-base.vue +136 -0
  43. package/src/components/midea-time-pave.vue +58 -0
  44. package/src/components/midea-video.vue +91 -0
  45. package/src/components/midea-vslider-bar-base.vue +89 -0
  46. package/src/components/pick-pallet.vue +66 -0
  47. package/src/index.js +180 -0
  48. package/src/transform-loader.js +249 -0
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-ijkplayer-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
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: "MideaIjkplayerView",
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
+ },
38
+ computed: {
39
+ hosSameLayerArgs() {
40
+ return {
41
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
42
+ width: this.width,
43
+ height: this.height,
44
+ data: this.data,
45
+
46
+ onProgress: this.onProgress,
47
+ onStart: this.onStart,
48
+ onPause: this.onPause,
49
+ finish: this.finish,
50
+ onFail: this.onFail,
51
+ onReadyToPlay: this.onReadyToPlay
52
+ };
53
+ },
54
+ },
55
+ mounted() {
56
+ this.width = this.$el.clientWidth;
57
+ this.height = this.$el.clientHeight;
58
+ },
59
+
60
+ methods: {
61
+ // 自定义拓展其它逻辑
62
+ onProgress(res) {
63
+ // TODO liujun189 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
64
+ this.$emit("onProgress", res);
65
+ },
66
+
67
+ onStart(res) {
68
+ // TODO liujun189 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
69
+ this.$emit("onStart", res);
70
+ },
71
+
72
+ onPause(res) {
73
+ // TODO liujun189 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
74
+ this.$emit("onPause", res);
75
+ },
76
+
77
+ finish(res) {
78
+ // TODO liujun189 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
79
+ this.$emit("finish", res);
80
+ },
81
+
82
+ onFail(res) {
83
+ // TODO liujun189 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
84
+ this.$emit("onFail", res);
85
+ },
86
+
87
+ onReadyToPlay(res) {
88
+ // TODO liujun189 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
89
+ this.$emit("onReadyToPlay", res);
90
+ }
91
+ },
92
+ };
93
+ </script>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-linechart-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
7
+ ></BaseSameLayer>
8
+ </template>
9
+
10
+ <script>
11
+ import BaseSameLayer from "./baseSameLayer.vue";
12
+
13
+ export default {
14
+ name: "MideaLinechartView",
15
+ data() {
16
+ return {
17
+ width: 0,
18
+ height: 0
19
+ }
20
+ },
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
+ },
38
+ computed: {
39
+ hosSameLayerArgs() {
40
+ return {
41
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
42
+ width: this.width,
43
+ height: this.height,
44
+ data: this.data,
45
+ };
46
+ },
47
+ },
48
+ mounted() {
49
+ this.width = this.$el.clientWidth;
50
+ this.height = this.$el.clientHeight;
51
+ },
52
+
53
+ methods: {
54
+ },
55
+ };
56
+ </script>
@@ -0,0 +1,69 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-lottie-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
7
+ >
8
+ </BaseSameLayer>
9
+ </template>
10
+
11
+ <script>
12
+ import BaseSameLayer from "./baseSameLayer.vue";
13
+
14
+ export default {
15
+ data() {
16
+ return {
17
+ width: 0,
18
+ height: 0,
19
+ };
20
+ },
21
+ name: "MideaLottieView",
22
+ components: {
23
+ BaseSameLayer,
24
+ },
25
+ props: {
26
+ hosUniqueProps: {
27
+ type: Object,
28
+ default() {
29
+ return {};
30
+ },
31
+ },
32
+ loop: {
33
+ type: Boolean,
34
+ default: true,
35
+ },
36
+ data: {
37
+ type: String,
38
+ default: "",
39
+ },
40
+ },
41
+ computed: {
42
+ hosSameLayerArgs() {
43
+ return {
44
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
45
+ width: this.width,
46
+ height: this.height,
47
+ loop: this.loop,
48
+ data: this.data,
49
+ };
50
+ },
51
+ },
52
+ mounted() {
53
+ this.width = this.$el.clientWidth;
54
+ this.height = this.$el.clientHeight;
55
+ },
56
+
57
+ methods: {
58
+ // 自定义拓展其它逻辑
59
+ handleOnChange(res) {
60
+ if (res.mode == 1) {
61
+ //停止滑动
62
+ this.$emit("slideEnd", res);
63
+ } else {
64
+ this.$emit("slideChange", res);
65
+ }
66
+ },
67
+ },
68
+ };
69
+ </script>
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-map-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
7
+ >
8
+ </BaseSameLayer>
9
+ </template>
10
+
11
+ <script>
12
+ import BaseSameLayer from "./baseSameLayer.vue";
13
+
14
+ export default {
15
+ data() {
16
+ return {
17
+ width: 0,
18
+ height: 0,
19
+ };
20
+ },
21
+ name: "MideaMapView",
22
+ components: {
23
+ BaseSameLayer,
24
+ },
25
+ props: {
26
+ hosUniqueProps: {
27
+ type: Object,
28
+ default() {
29
+ return {};
30
+ },
31
+ },
32
+ data: {
33
+ type: Object,
34
+ default() {
35
+ return {};
36
+ },
37
+ },
38
+ },
39
+ computed: {
40
+ hosSameLayerArgs() {
41
+ return {
42
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
43
+ width: this.width,
44
+ height: this.height,
45
+ data: this.data,
46
+ markerPick: this.markerPick,
47
+ pointPick: this.pointPick,
48
+ };
49
+ },
50
+ },
51
+ mounted() {
52
+ this.width = this.$el.clientWidth;
53
+ this.height = this.$el.clientHeight;
54
+ },
55
+
56
+ methods: {
57
+ // 自定义拓展其它逻辑
58
+ handleOnChange(res) {
59
+ if (res.mode == 1) {
60
+ //停止滑动
61
+ this.$emit("slideEnd", res);
62
+ } else {
63
+ this.$emit("slideChange", res);
64
+ }
65
+ },
66
+ markerPick(res) {
67
+ this.$emit("marker-pick", res);
68
+ },
69
+ pointPick(res) {
70
+ this.$emit("point-pick", res);
71
+ },
72
+ },
73
+ };
74
+ </script>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-pdf-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
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: "MideaPdfView",
21
+ components: {
22
+ BaseSameLayer,
23
+ },
24
+ props: {
25
+ hosUniqueProps: {
26
+ type: Object,
27
+ default() {
28
+ return {};
29
+ },
30
+ },
31
+ pdfPath: {
32
+ type: String, // android是pdfPath, ios为src, 后续可以做兼容
33
+ require: true
34
+ },
35
+ },
36
+ computed: {
37
+ hosSameLayerArgs() {
38
+ return {
39
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
40
+ width: this.width,
41
+ height: this.height,
42
+ pdfPath: this.pdfPath,
43
+ pagestart: this.handlePagestart,
44
+ pageprogress: this.handlePageprogress,
45
+ pagefinish: this.handlePagefinish,
46
+ pagefailed: this.handlePagefailed,
47
+ retry: this.handleRetry,
48
+ };
49
+ },
50
+ },
51
+ mounted() {
52
+ this.width = this.$el.clientWidth;
53
+ this.height = this.$el.clientHeight;
54
+ },
55
+
56
+ methods: {
57
+ // 自定义拓展其它逻辑
58
+ handlePagestart(res) {
59
+ this.$emit("pagestart", res);
60
+ },
61
+ handlePageprogress(res) {
62
+ this.$emit("pageprogress", res);
63
+ },
64
+ handlePagefinish(res) {
65
+ this.$emit("pagefinish", res);
66
+ },
67
+ handleRetry(res) {
68
+ this.$emit("pagefailed", res);
69
+ },
70
+ handlePagefailed(res) {
71
+ this.$emit("retry", res);
72
+ },
73
+ },
74
+ };
75
+ </script>
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-picker"
5
+ :defaultWidth="300"
6
+ :defaultHeight="180"
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: "MideaPicker",
21
+ components: {
22
+ BaseSameLayer
23
+ },
24
+ props: {
25
+ hosUniqueProps: {
26
+ type: Object,
27
+ default() {
28
+ return {}
29
+ }
30
+ },
31
+ config: {
32
+ type: Object,
33
+ required: true
34
+ }
35
+ },
36
+ computed: {
37
+ hosSameLayerArgs() {
38
+ return {
39
+ ...this.hosUniqueProps,// 鸿蒙原生组件独有属性
40
+ width: this.width,
41
+ height: this.height,
42
+ config: this.config,
43
+ onScrollCompleted: this.onScollCompleted
44
+ }
45
+ }
46
+ },
47
+ mounted() {
48
+ this.width = this.$el.clientWidth;
49
+ this.height = this.$el.clientHeight;
50
+ },
51
+
52
+ methods: {
53
+ onScollCompleted(res) {
54
+ this.$emit("mideaPickerChange", res)
55
+ },
56
+ },
57
+ };
58
+ </script>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-piechart-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
7
+ ></BaseSameLayer>
8
+ </template>
9
+
10
+ <script>
11
+ import BaseSameLayer from "./baseSameLayer.vue";
12
+
13
+ export default {
14
+ name: "MideaPiechartView",
15
+ data() {
16
+ return {
17
+ width: 0,
18
+ height: 0
19
+ }
20
+ },
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
+ },
38
+ computed: {
39
+ hosSameLayerArgs() {
40
+ return {
41
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
42
+ width: this.width,
43
+ height: this.height,
44
+ data: this.data,
45
+ };
46
+ },
47
+ },
48
+ mounted() {
49
+ this.width = this.$el.clientWidth;
50
+ this.height = this.$el.clientHeight;
51
+ },
52
+
53
+ methods: {
54
+ },
55
+ };
56
+ </script>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-progresscycle-view"
5
+ :defaultWidth="300"
6
+ :defaultHeight="300"
7
+ ></BaseSameLayer>
8
+ </template>
9
+
10
+ <script>
11
+ import BaseSameLayer from "./baseSameLayer.vue";
12
+
13
+ export default {
14
+ name: "MideaProgresscycleView",
15
+ data() {
16
+ return {
17
+ width: 0,
18
+ height: 0
19
+ }
20
+ },
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
+ },
38
+ computed: {
39
+ hosSameLayerArgs() {
40
+ return {
41
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
42
+ width: this.width,
43
+ height: this.height,
44
+ data: this.data,
45
+ };
46
+ },
47
+ },
48
+ mounted() {
49
+ this.width = this.$el.clientWidth;
50
+ this.height = this.$el.clientHeight;
51
+ },
52
+
53
+ methods: {
54
+ },
55
+ };
56
+ </script>
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-seek-bar"
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: "MideaSeekBar",
21
+ components: {
22
+ BaseSameLayer,
23
+ },
24
+ props: {
25
+ hosUniqueProps: {
26
+ type: Object,
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
+ },
91
+ },
92
+ computed: {
93
+ hosSameLayerArgs() {
94
+ return {
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
+ },
116
+ },
117
+ mounted() {
118
+ this.width = this.$el.clientWidth;
119
+ this.height = this.$el.clientHeight;
120
+ },
121
+
122
+ methods: {
123
+ // 自定义拓展其它逻辑
124
+ handleOnChange(res) {
125
+ if (res.mode == 1) { //停止滑动
126
+ this.$emit("stopChange", res);
127
+ this.$emit("slideEnd", res);
128
+ } else {
129
+ this.$emit("change", res);
130
+ this.$emit("slideChange", res);
131
+ }
132
+ },
133
+ },
134
+ };
135
+ </script>
136
+