@easyv/config 1.1.3 → 1.1.6

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/src/mapping.js CHANGED
@@ -1,26 +1,26 @@
1
- const defaultMapping = { fieldName: '', displayName: '' };
2
- export default ({ fieldName = '', displayName = '' } = defaultMapping) => ({
3
- name: 'mapping',
4
- displayName: '映射',
5
- value: [
6
- {
7
- name: 'fieldName',
8
- displayName: '字段名',
9
- value: fieldName,
10
- type: 'input',
11
- config: {
12
- span: 12,
13
- },
14
- },
15
- {
16
- name: 'displayName',
17
- displayName: '显示名',
18
- value: displayName,
19
- type: 'input',
20
- config: {
21
- span: 12,
22
- },
23
- },
24
- ],
25
- type: 'group',
26
- });
1
+ const defaultMapping = { fieldName: '', displayName: '' };
2
+ export default ({ fieldName = '', displayName = '' } = defaultMapping) => ({
3
+ name: 'mapping',
4
+ displayName: '映射',
5
+ value: [
6
+ {
7
+ name: 'fieldName',
8
+ displayName: '字段名',
9
+ value: fieldName,
10
+ type: 'input',
11
+ config: {
12
+ span: 12,
13
+ },
14
+ },
15
+ {
16
+ name: 'displayName',
17
+ displayName: '显示名',
18
+ value: displayName,
19
+ type: 'input',
20
+ config: {
21
+ span: 12,
22
+ },
23
+ },
24
+ ],
25
+ type: 'group',
26
+ });
package/src/margin.js CHANGED
@@ -1,58 +1,58 @@
1
- const defaultMargin = {
2
- marginTop: 0,
3
- marginRight: 0,
4
- marginBottom: 0,
5
- marginLeft: 0,
6
- };
7
- export default ({
8
- marginTop = defaultMargin.marginTop,
9
- marginRight = defaultMargin.marginRight,
10
- marginBottom = defaultMargin.marginBottom,
11
- marginLeft = defaultMargin.marginLeft,
12
- } = defaultMargin) => ({
13
- type: 'group',
14
- name: 'margin',
15
- displayName: '边距',
16
- value: [
17
- {
18
- type: 'number',
19
- name: 'marginTop',
20
- displayName: '上',
21
- value: marginTop,
22
- config: {
23
- span: 6,
24
- showStep: false,
25
- },
26
- },
27
- {
28
- type: 'number',
29
- name: 'marginBottom',
30
- displayName: '下',
31
- value: marginBottom,
32
- config: {
33
- span: 6,
34
- showStep: false,
35
- },
36
- },
37
- {
38
- type: 'number',
39
- name: 'marginLeft',
40
- displayName: '左',
41
- value: marginLeft,
42
- config: {
43
- span: 6,
44
- showStep: false,
45
- },
46
- },
47
- {
48
- type: 'number',
49
- name: 'marginRight',
50
- displayName: '右',
51
- value: marginRight,
52
- config: {
53
- span: 6,
54
- showStep: false,
55
- },
56
- },
57
- ],
58
- });
1
+ const defaultMargin = {
2
+ marginTop: 0,
3
+ marginRight: 0,
4
+ marginBottom: 0,
5
+ marginLeft: 0,
6
+ };
7
+ export default ({
8
+ marginTop = defaultMargin.marginTop,
9
+ marginRight = defaultMargin.marginRight,
10
+ marginBottom = defaultMargin.marginBottom,
11
+ marginLeft = defaultMargin.marginLeft,
12
+ } = defaultMargin) => ({
13
+ type: 'group',
14
+ name: 'margin',
15
+ displayName: '边距',
16
+ value: [
17
+ {
18
+ type: 'number',
19
+ name: 'marginTop',
20
+ displayName: '上',
21
+ value: marginTop,
22
+ config: {
23
+ span: 6,
24
+ showStep: false,
25
+ },
26
+ },
27
+ {
28
+ type: 'number',
29
+ name: 'marginBottom',
30
+ displayName: '下',
31
+ value: marginBottom,
32
+ config: {
33
+ span: 6,
34
+ showStep: false,
35
+ },
36
+ },
37
+ {
38
+ type: 'number',
39
+ name: 'marginLeft',
40
+ displayName: '左',
41
+ value: marginLeft,
42
+ config: {
43
+ span: 6,
44
+ showStep: false,
45
+ },
46
+ },
47
+ {
48
+ type: 'number',
49
+ name: 'marginRight',
50
+ displayName: '右',
51
+ value: marginRight,
52
+ config: {
53
+ span: 6,
54
+ showStep: false,
55
+ },
56
+ },
57
+ ],
58
+ });
package/src/multiColor.js CHANGED
@@ -1,31 +1,31 @@
1
- const defaultMultiColor = {
2
- type: 'linear',
3
- pure: '#fff',
4
- linear: {
5
- stops: [
6
- { offset: 0, color: '#fff' },
7
- { offset: 50, color: '#ff0' },
8
- { offset: 100, color: '#f0f' }
9
- ],
10
- angle: 30,
11
- opacity: 1
12
- }
13
- };
14
- export default ({
15
- type = defaultMultiColor.type,
16
- pure = defaultMultiColor.pure,
17
- linear:{
18
- stops = defaultMultiColor.linear.stops,
19
- angle = defaultMultiColor.linear.angle,
20
- opacity = defaultMultiColor.linear.opacity,
21
- } = defaultMultiColor.linear
22
- } = defaultMultiColor) => ({
23
- type,
24
- pure,
25
- linear:{
26
- stops,
27
- angle,
28
- opacity
29
- }
30
- });
1
+ const defaultMultiColor = {
2
+ type: 'linear',
3
+ pure: '#fff',
4
+ linear: {
5
+ stops: [
6
+ { offset: 0, color: '#fff' },
7
+ { offset: 50, color: '#ff0' },
8
+ { offset: 100, color: '#f0f' }
9
+ ],
10
+ angle: 30,
11
+ opacity: 1
12
+ }
13
+ };
14
+ export default ({
15
+ type = defaultMultiColor.type,
16
+ pure = defaultMultiColor.pure,
17
+ linear:{
18
+ stops = defaultMultiColor.linear.stops,
19
+ angle = defaultMultiColor.linear.angle,
20
+ opacity = defaultMultiColor.linear.opacity,
21
+ } = defaultMultiColor.linear
22
+ } = defaultMultiColor) => ({
23
+ type,
24
+ pure,
25
+ linear:{
26
+ stops,
27
+ angle,
28
+ opacity
29
+ }
30
+ });
31
31