@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,57 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-blur-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: "MideaBlurView",
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
+ };
57
+ </script>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-calendar-pave"
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: "MideaCalendarPave",
21
+ components: {
22
+ BaseSameLayer
23
+ },
24
+ props: {
25
+ hosUniqueProps: {
26
+ type: Object,
27
+ default() {
28
+ return {}
29
+ }
30
+ },
31
+ value: {
32
+ type: Array,
33
+ required: false
34
+ },
35
+ activeColor: {
36
+ type: String,
37
+ required: false
38
+ }
39
+ },
40
+ computed: {
41
+ hosSameLayerArgs() {
42
+ return {
43
+ ...this.hosUniqueProps,// 鸿蒙原生组件独有属性
44
+ width: this.width,
45
+ height: this.height,
46
+ value: this.value,
47
+ activeColor: this.activeColor,
48
+ onSelectDateChanged: this.onSelectDateChanged
49
+ }
50
+ }
51
+ },
52
+ mounted() {
53
+ this.width = this.$el.clientWidth;
54
+ this.height = this.$el.clientHeight;
55
+ },
56
+
57
+ methods: {
58
+ onSelectDateChanged(res) {
59
+ /* Warning: 和系统的事件重名了,需要加前缀,待同步修改 */
60
+ this.$emit("change", res)
61
+ },
62
+ },
63
+ };
64
+ </script>
@@ -0,0 +1,91 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ ref="mideaCameraViewRef"
4
+ :hosSameLayerArgs="hosSameLayerArgs"
5
+ embedType="native/midea-camera-view"
6
+ :defaultWidth="500"
7
+ :defaultHeight="600"
8
+ ></BaseSameLayer>
9
+ </template>
10
+
11
+ <script>
12
+ import BaseSameLayer from './baseSameLayer.vue';
13
+ const weexModule = weex.requireModule('weexModule');
14
+
15
+ export default {
16
+ name: 'MideaCameraView',
17
+ data() {
18
+ return {
19
+ width: 0,
20
+ height: 0,
21
+ embedId: '',
22
+ };
23
+ },
24
+ components: {
25
+ BaseSameLayer,
26
+ },
27
+ props: {
28
+ hosUniqueProps: {
29
+ type: Object,
30
+ default() {
31
+ return {};
32
+ },
33
+ },
34
+ data: {
35
+ type: Object,
36
+ default() {
37
+ return {};
38
+ },
39
+ },
40
+ },
41
+ computed: {
42
+ hosSameLayerArgs() {
43
+ return {
44
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
45
+ width: this.width,
46
+ height: this.height,
47
+ data: this.data,
48
+ takePhotoFinish: this.takePhotoFinish,
49
+ };
50
+ },
51
+ },
52
+ mounted() {
53
+ this.width = this.$el.clientWidth;
54
+ this.height = this.$el.clientHeight;
55
+ this.embedId = this.$refs.mideaCameraViewRef.embedId;
56
+ console.log(this.embedId, 'this.embedId');
57
+ },
58
+
59
+ methods: {
60
+ takePhotoFinish(res) {
61
+ this.$emit('takePhotoFinish', res);
62
+ },
63
+ takePhoto() {
64
+ weexModule.callNative('cameraHandle', {
65
+ method: 'takePhoto',
66
+ name: this.embedId,
67
+ });
68
+ },
69
+ changeCameraPosition() {
70
+ weexModule.callNative('cameraHandle', {
71
+ method: 'changeCameraPosition',
72
+ name: this.embedId,
73
+ });
74
+ },
75
+ openTorch(params) {
76
+ weexModule.callNative('cameraHandle', {
77
+ method: 'openTorch',
78
+ name: this.embedId,
79
+ params,
80
+ });
81
+ },
82
+ closeTorch(params) {
83
+ weexModule.callNative('cameraHandle', {
84
+ method: 'closeTorch',
85
+ name: this.embedId,
86
+ params,
87
+ });
88
+ },
89
+ },
90
+ };
91
+ </script>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-circle-progress-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: "MideaCircleProgressView",
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-combinechart-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: "MideaCombinechartView",
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,55 @@
1
+ <template>
2
+ <iframe :src="url"></iframe>
3
+ </template>
4
+
5
+ <script>
6
+ const weexModule = weex.requireModule('weexModule')
7
+
8
+ export default {
9
+ data() {
10
+ return {
11
+ url: "",
12
+ backgroundColor: "transparent",
13
+ };
14
+ },
15
+ name: "MideaCommonWeexView",
16
+ props: {
17
+ hosUniqueProps: {
18
+ type: Object,
19
+ default() {
20
+ return {};
21
+ },
22
+ },
23
+ router: {
24
+ type: Object,
25
+ default() {
26
+ return {};
27
+ },
28
+ },
29
+ src: {
30
+ type: String,
31
+ },
32
+ pluginData: {
33
+ type: Object,
34
+ },
35
+ },
36
+ created() {
37
+ weexModule.callNative(
38
+ `webview.webHandle`,
39
+ {
40
+ method: "parseCommonWeexParams",
41
+ ...this.hosUniqueProps,
42
+ router: this.router,
43
+ src: this.src,
44
+ pluginData: this.pluginData,
45
+ },
46
+ (args) => {
47
+ console.log(args);
48
+
49
+ this.url = args.url;
50
+ this.backgroundColor = args.pageBackgroundColor;
51
+ }
52
+ );
53
+ },
54
+ };
55
+ </script>
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ ref="mideaDragListView"
4
+ :hosSameLayerArgs="hosSameLayerArgs"
5
+ embedType="native/midea-drag-list-view"
6
+ :defaultWidth="500"
7
+ :defaultHeight="500"
8
+ ></BaseSameLayer>
9
+ </template>
10
+
11
+ <script>
12
+ import BaseSameLayer from './baseSameLayer.vue';
13
+ const weexModule = weex.requireModule('weexModule');
14
+
15
+ export default {
16
+ data() {
17
+ return {
18
+ width: 0,
19
+ height: 0,
20
+ embedId: '',
21
+ };
22
+ },
23
+ name: 'MideaDragListView',
24
+ components: {
25
+ BaseSameLayer,
26
+ },
27
+ props: {
28
+ data: {
29
+ hosUniqueProps: {
30
+ type: Object,
31
+ default() {
32
+ return {};
33
+ },
34
+ },
35
+ data: {
36
+ type: Object,
37
+ default() {
38
+ return {};
39
+ },
40
+ },
41
+ },
42
+ },
43
+ computed: {
44
+ hosSameLayerArgs() {
45
+ return {
46
+ ...this.hosUniqueProps, // 鸿蒙原生组件独有属性
47
+ width: this.width,
48
+ height: this.height,
49
+ data: this.data,
50
+ onDeleteEvent: this.onDeleteEvent,
51
+ onDragEventStart: this.onDragEventStart,
52
+ onDragEventEnd: this.onDragEventEnd,
53
+ onClickEvent: this.onClickEvent,
54
+ };
55
+ },
56
+ },
57
+ mounted() {
58
+ this.width = this.$el.clientWidth;
59
+ this.height = this.$el.clientHeight;
60
+ this.embedId = this.$refs.mideaDragListView.embedId;
61
+ },
62
+
63
+ methods: {
64
+ onDeleteEvent(params) {
65
+ this.$emit('onDeleteEvent', params);
66
+ },
67
+ onDragEventStart(params) {
68
+ this.$emit('onDragEventStart', params);
69
+ },
70
+ onDragEventEnd(params) {
71
+ this.$emit('onDragEventEnd', params);
72
+ },
73
+ onClickEvent(params) {
74
+ this.$emit('onClickEvent', params);
75
+ },
76
+ getListData(callback) {
77
+ weexModule.callNative(
78
+ 'dragListHandle',
79
+ {
80
+ method: 'getListData',
81
+ name: this.embedId,
82
+ },
83
+ callback,
84
+ callback
85
+ );
86
+ },
87
+ },
88
+ };
89
+ </script>
@@ -0,0 +1,66 @@
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: {
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
+ handleOnChange: this.handleOnChange,
46
+ };
47
+ },
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 == 1) { //停止滑动
58
+ this.$emit("endProgress", res);
59
+ } else {
60
+ this.$emit("onProgress", res);
61
+ }
62
+ },
63
+ },
64
+ };
65
+ </script>
66
+
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-dragging-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: "MideaDraggingLinechartView",
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,63 @@
1
+ <template>
2
+ <BaseSameLayer
3
+ :hosSameLayerArgs="hosSameLayerArgs"
4
+ embedType="native/midea-gesture-password"
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: "MideaGesturePassword",
21
+ components: {
22
+ BaseSameLayer,
23
+ },
24
+ props: {
25
+ hosUniqueProps: {
26
+ type: Object,
27
+ default() {
28
+ return {};
29
+ },
30
+ },
31
+ property: {
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
+ property: this.property,
45
+ handleFinish: this.handleFinish,
46
+ };
47
+ },
48
+ },
49
+ mounted() {
50
+ this.width = this.$el.clientWidth;
51
+ this.height = this.$el.clientHeight;
52
+ },
53
+
54
+ methods: {
55
+ // 自定义拓展其它逻辑
56
+ handleFinish(res) {
57
+ // 暂时不能用finish等内置方法,会被vue-precompiler加入一个undefined的stopPropagation(),导致回调异常
58
+ // update 20240828 自定义的vue-precompiler 已经修复 by wuhl
59
+ this.$emit("finish", res);
60
+ },
61
+ },
62
+ };
63
+ </script>