@easyv/config 1.3.1 → 1.3.2

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/lib/control.js CHANGED
@@ -1,123 +1,123 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.control = void 0;
7
- var defaultControl = {
8
- height: 20,
9
- color: "rgba(20, 95, 255, 0.1)",
10
- margin: {
11
- left: 40,
12
- right: 40
13
- },
14
- gap: 20,
15
- drag: {
16
- start: 0,
17
- width: 30,
18
- color: "RGBA(255, 255, 255, .3)"
19
- }
20
- };
21
- var control = function control() {
22
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultControl,
23
- _ref$height = _ref.height,
24
- height = _ref$height === void 0 ? defaultControl.height : _ref$height,
25
- _ref$color = _ref.color,
26
- color = _ref$color === void 0 ? defaultControl.color : _ref$color,
27
- _ref$margin = _ref.margin;
28
- _ref$margin = _ref$margin === void 0 ? defaultControl.margin : _ref$margin;
29
- var _ref$margin$left = _ref$margin.left,
30
- left = _ref$margin$left === void 0 ? defaultControl.margin.left : _ref$margin$left,
31
- _ref$margin$right = _ref$margin.right,
32
- right = _ref$margin$right === void 0 ? defaultControl.margin.right : _ref$margin$right,
33
- _ref$gap = _ref.gap,
34
- gap = _ref$gap === void 0 ? defaultControl.gap : _ref$gap,
35
- _ref$drag = _ref.drag;
36
- _ref$drag = _ref$drag === void 0 ? defaultControl.drag : _ref$drag;
37
- var _ref$drag$start = _ref$drag.start,
38
- start = _ref$drag$start === void 0 ? defaultControl.drag.start : _ref$drag$start,
39
- _ref$drag$width = _ref$drag.width,
40
- width = _ref$drag$width === void 0 ? defaultControl.drag.width : _ref$drag$width,
41
- _ref$drag$color = _ref$drag.color,
42
- dragColor = _ref$drag$color === void 0 ? defaultControl.drag.color : _ref$drag$color;
43
- return {
44
- name: "control",
45
- displayName: "控制条",
46
- value: [{
47
- name: "height",
48
- displayName: "高度",
49
- value: height,
50
- type: "number"
51
- }, {
52
- name: "color",
53
- displayName: "背景颜色",
54
- value: color,
55
- type: "color"
56
- }, {
57
- type: "group",
58
- name: "margin",
59
- displayName: "边距",
60
- value: [{
61
- name: "left",
62
- displayName: "左边距",
63
- value: left,
64
- type: "number",
65
- config: {
66
- span: 12
67
- }
68
- }, {
69
- name: "right",
70
- displayName: "右边距",
71
- value: right,
72
- type: "number",
73
- config: {
74
- span: 12
75
- }
76
- }]
77
- }, {
78
- name: "gap",
79
- displayName: "上间距",
80
- type: "number",
81
- value: gap,
82
- config: {
83
- suffix: "px"
84
- },
85
- tip: "与X轴的距离"
86
- }, {
87
- "name": "thumbnail",
88
- "displayName": "开启缩略图",
89
- "value": true,
90
- "type": "boolean"
91
- }, {
92
- name: "drag",
93
- displayName: "详情区域",
94
- value: [{
95
- name: "start",
96
- displayName: "起始位置",
97
- value: start,
98
- type: "range",
99
- config: {
100
- suffix: "%",
101
- min: 0,
102
- max: 100
103
- }
104
- }, {
105
- name: "width",
106
- displayName: "宽度",
107
- value: width,
108
- type: "range",
109
- config: {
110
- suffix: "%",
111
- min: 1,
112
- max: 100
113
- }
114
- }, {
115
- name: "color",
116
- displayName: "颜色",
117
- value: dragColor,
118
- type: "color"
119
- }]
120
- }]
121
- };
122
- };
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.control = void 0;
7
+ var defaultControl = {
8
+ height: 20,
9
+ color: "rgba(20, 95, 255, 0.1)",
10
+ margin: {
11
+ left: 40,
12
+ right: 40
13
+ },
14
+ gap: 20,
15
+ drag: {
16
+ start: 0,
17
+ width: 30,
18
+ color: "RGBA(255, 255, 255, .3)"
19
+ }
20
+ };
21
+ var control = function control() {
22
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultControl,
23
+ _ref$height = _ref.height,
24
+ height = _ref$height === void 0 ? defaultControl.height : _ref$height,
25
+ _ref$color = _ref.color,
26
+ color = _ref$color === void 0 ? defaultControl.color : _ref$color,
27
+ _ref$margin = _ref.margin;
28
+ _ref$margin = _ref$margin === void 0 ? defaultControl.margin : _ref$margin;
29
+ var _ref$margin$left = _ref$margin.left,
30
+ left = _ref$margin$left === void 0 ? defaultControl.margin.left : _ref$margin$left,
31
+ _ref$margin$right = _ref$margin.right,
32
+ right = _ref$margin$right === void 0 ? defaultControl.margin.right : _ref$margin$right,
33
+ _ref$gap = _ref.gap,
34
+ gap = _ref$gap === void 0 ? defaultControl.gap : _ref$gap,
35
+ _ref$drag = _ref.drag;
36
+ _ref$drag = _ref$drag === void 0 ? defaultControl.drag : _ref$drag;
37
+ var _ref$drag$start = _ref$drag.start,
38
+ start = _ref$drag$start === void 0 ? defaultControl.drag.start : _ref$drag$start,
39
+ _ref$drag$width = _ref$drag.width,
40
+ width = _ref$drag$width === void 0 ? defaultControl.drag.width : _ref$drag$width,
41
+ _ref$drag$color = _ref$drag.color,
42
+ dragColor = _ref$drag$color === void 0 ? defaultControl.drag.color : _ref$drag$color;
43
+ return {
44
+ name: "control",
45
+ displayName: "控制条",
46
+ value: [{
47
+ name: "height",
48
+ displayName: "高度",
49
+ value: height,
50
+ type: "number"
51
+ }, {
52
+ name: "color",
53
+ displayName: "背景颜色",
54
+ value: color,
55
+ type: "color"
56
+ }, {
57
+ type: "group",
58
+ name: "margin",
59
+ displayName: "边距",
60
+ value: [{
61
+ name: "left",
62
+ displayName: "左边距",
63
+ value: left,
64
+ type: "number",
65
+ config: {
66
+ span: 12
67
+ }
68
+ }, {
69
+ name: "right",
70
+ displayName: "右边距",
71
+ value: right,
72
+ type: "number",
73
+ config: {
74
+ span: 12
75
+ }
76
+ }]
77
+ }, {
78
+ name: "gap",
79
+ displayName: "上间距",
80
+ type: "number",
81
+ value: gap,
82
+ config: {
83
+ suffix: "px"
84
+ },
85
+ tip: "与X轴的距离"
86
+ }, {
87
+ "name": "thumbnail",
88
+ "displayName": "开启缩略图",
89
+ "value": true,
90
+ "type": "boolean"
91
+ }, {
92
+ name: "drag",
93
+ displayName: "详情区域",
94
+ value: [{
95
+ name: "start",
96
+ displayName: "起始位置",
97
+ value: start,
98
+ type: "range",
99
+ config: {
100
+ suffix: "%",
101
+ min: 0,
102
+ max: 100
103
+ }
104
+ }, {
105
+ name: "width",
106
+ displayName: "宽度",
107
+ value: width,
108
+ type: "range",
109
+ config: {
110
+ suffix: "%",
111
+ min: 1,
112
+ max: 100
113
+ }
114
+ }, {
115
+ name: "color",
116
+ displayName: "颜色",
117
+ value: dragColor,
118
+ type: "color"
119
+ }]
120
+ }]
121
+ };
122
+ };
123
123
  exports.control = control;