@byteluck-fe/model-driven-settings 2.7.0-alpha.28a → 2.7.0-alpha.31b
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/README.md +30 -30
- package/dist/esm/default/createBaseFields.js +29 -31
- package/dist/esm/default/createFormBaseFields.js +63 -64
- package/dist/esm/default/index.js +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/initSettings.js +24 -48
- package/dist/esm/props/base.js +10 -34
- package/dist/esm/props/checkbox.js +27 -42
- package/dist/esm/props/custom.js +36 -36
- package/dist/esm/props/input-number.js +31 -48
- package/dist/esm/props/input.js +33 -51
- package/dist/esm/props/radio.js +29 -45
- package/dist/esm/props/select.js +29 -45
- package/dist/esm/props/switch.js +31 -48
- package/dist/esm/props/textarea.js +37 -57
- package/dist/esm/schema/group.js +9 -28
- package/dist/esm/schema/index.js +3 -3
- package/dist/esm/schema/setting.js +13 -36
- package/dist/esm/schema/tab.js +4 -19
- package/dist/index.umd.js +2 -2
- package/dist/types/default/createBaseFields.d.ts +2 -2
- package/dist/types/default/createFormBaseFields.d.ts +3 -3
- package/dist/types/default/index.d.ts +2 -2
- package/dist/types/defineInstance.d.ts +79 -79
- package/dist/types/index.d.ts +4 -4
- package/dist/types/initSettings.d.ts +14 -14
- package/dist/types/props/base.d.ts +21 -21
- package/dist/types/props/checkbox.d.ts +5 -5
- package/dist/types/props/custom.d.ts +5 -5
- package/dist/types/props/input-number.d.ts +7 -7
- package/dist/types/props/input.d.ts +8 -8
- package/dist/types/props/radio.d.ts +6 -6
- package/dist/types/props/select.d.ts +6 -6
- package/dist/types/props/switch.d.ts +7 -7
- package/dist/types/props/textarea.d.ts +10 -10
- package/dist/types/schema/group.d.ts +19 -19
- package/dist/types/schema/index.d.ts +3 -3
- package/dist/types/schema/setting.d.ts +69 -69
- package/dist/types/schema/tab.d.ts +15 -15
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# Settings
|
|
2
|
-
自定义控件设置
|
|
3
|
-
|
|
4
|
-
```
|
|
5
|
-
│ defineInstance.ts // 定义控件函数
|
|
6
|
-
│ index.ts
|
|
7
|
-
│ initSettings.ts // 初始化setting,被外部引用
|
|
8
|
-
│
|
|
9
|
-
├─default // 内部默认值
|
|
10
|
-
│ createBaseFields.ts // 基础控件的默认setting
|
|
11
|
-
│ createFormBaseFields.ts // 表单控件的默认setting
|
|
12
|
-
│ index.ts
|
|
13
|
-
│
|
|
14
|
-
├─props // 内置的setting控件
|
|
15
|
-
│ base.ts
|
|
16
|
-
│ checkbox.ts
|
|
17
|
-
│ custom.ts
|
|
18
|
-
│ input-number.ts
|
|
19
|
-
│ input.ts
|
|
20
|
-
│ radio.ts
|
|
21
|
-
│ select.ts
|
|
22
|
-
│ switch.ts
|
|
23
|
-
│ textarea.ts
|
|
24
|
-
│
|
|
25
|
-
└─schema // setting的容器和schema定义
|
|
26
|
-
group.ts
|
|
27
|
-
index.ts
|
|
28
|
-
setting.ts
|
|
29
|
-
tab.ts
|
|
30
|
-
```
|
|
1
|
+
# Settings
|
|
2
|
+
自定义控件设置
|
|
3
|
+
|
|
4
|
+
```
|
|
5
|
+
│ defineInstance.ts // 定义控件函数
|
|
6
|
+
│ index.ts
|
|
7
|
+
│ initSettings.ts // 初始化setting,被外部引用
|
|
8
|
+
│
|
|
9
|
+
├─default // 内部默认值
|
|
10
|
+
│ createBaseFields.ts // 基础控件的默认setting
|
|
11
|
+
│ createFormBaseFields.ts // 表单控件的默认setting
|
|
12
|
+
│ index.ts
|
|
13
|
+
│
|
|
14
|
+
├─props // 内置的setting控件
|
|
15
|
+
│ base.ts
|
|
16
|
+
│ checkbox.ts
|
|
17
|
+
│ custom.ts
|
|
18
|
+
│ input-number.ts
|
|
19
|
+
│ input.ts
|
|
20
|
+
│ radio.ts
|
|
21
|
+
│ select.ts
|
|
22
|
+
│ switch.ts
|
|
23
|
+
│ textarea.ts
|
|
24
|
+
│
|
|
25
|
+
└─schema // setting的容器和schema定义
|
|
26
|
+
group.ts
|
|
27
|
+
index.ts
|
|
28
|
+
setting.ts
|
|
29
|
+
tab.ts
|
|
30
|
+
```
|
|
@@ -1,66 +1,64 @@
|
|
|
1
1
|
export function createBaseFields() {
|
|
2
2
|
return [
|
|
3
3
|
{
|
|
4
|
-
label:
|
|
5
|
-
key:
|
|
6
|
-
type:
|
|
7
|
-
component:
|
|
4
|
+
label: '隐藏',
|
|
5
|
+
key: 'isHide',
|
|
6
|
+
type: 'boolean',
|
|
7
|
+
component: 'switch'
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
key:
|
|
11
|
-
component:
|
|
10
|
+
key: 'superSetting',
|
|
11
|
+
component: 'super-setting'
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
key:
|
|
15
|
-
component:
|
|
14
|
+
key: 'style.width',
|
|
15
|
+
component: 'styleComponent',
|
|
16
16
|
props: {
|
|
17
|
-
configKey:
|
|
17
|
+
configKey: 'style.widthConfig',
|
|
18
18
|
options: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
'px',
|
|
20
|
+
'%',
|
|
21
|
+
'fill',
|
|
22
|
+
'hug'
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
26
|
-
var _oldParent;
|
|
27
26
|
var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
|
|
28
|
-
if ((
|
|
29
|
-
driven.setInstance(instance,
|
|
30
|
-
driven.setInstance(instance,
|
|
27
|
+
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === 'advanced-container' && newParent.type === 'positioning-container') {
|
|
28
|
+
driven.setInstance(instance, 'style.width', '');
|
|
29
|
+
driven.setInstance(instance, 'style.widthConfig', 'fill');
|
|
31
30
|
}
|
|
32
31
|
if (newParent) {
|
|
33
32
|
return {
|
|
34
|
-
visible: newParent.type ===
|
|
33
|
+
visible: newParent.type === 'advanced-container'
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
38
|
{
|
|
40
|
-
key:
|
|
41
|
-
component:
|
|
39
|
+
key: 'style.height',
|
|
40
|
+
component: 'styleComponent',
|
|
42
41
|
props: {
|
|
43
|
-
configKey:
|
|
42
|
+
configKey: 'style.heightConfig',
|
|
44
43
|
options: [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
'px',
|
|
45
|
+
'%',
|
|
46
|
+
'fill',
|
|
47
|
+
'hug'
|
|
49
48
|
]
|
|
50
49
|
},
|
|
51
50
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
52
|
-
var _oldParent;
|
|
53
51
|
var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
|
|
54
|
-
if ((
|
|
55
|
-
driven.setInstance(instance,
|
|
56
|
-
driven.setInstance(instance,
|
|
52
|
+
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === 'advanced-container' && newParent.type === 'positioning-container') {
|
|
53
|
+
driven.setInstance(instance, 'style.height', '');
|
|
54
|
+
driven.setInstance(instance, 'style.heightConfig', 'fill');
|
|
57
55
|
}
|
|
58
56
|
if (payload.newParent) {
|
|
59
57
|
return {
|
|
60
|
-
visible: payload.newParent.type ===
|
|
58
|
+
visible: payload.newParent.type === 'advanced-container'
|
|
61
59
|
};
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
|
-
}
|
|
62
|
+
},
|
|
65
63
|
];
|
|
66
64
|
}
|
|
@@ -1,131 +1,130 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _arrayLikeToArray(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
if (Array.isArray(arr)) return
|
|
6
|
+
function _arrayWithoutHoles(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _iterableToArray(iter) {
|
|
10
10
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function _nonIterableSpread() {
|
|
13
13
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
function _toConsumableArray(arr) {
|
|
16
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
19
19
|
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return
|
|
20
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
21
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
22
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
24
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
25
|
}
|
|
26
|
-
import { createBaseFields } from
|
|
26
|
+
import { createBaseFields } from './createBaseFields';
|
|
27
27
|
export function createFormBaseFields(defaultValues) {
|
|
28
|
-
|
|
29
|
-
return _to_consumable_array(createBaseFields()).concat([
|
|
28
|
+
return _toConsumableArray(createBaseFields()).concat([
|
|
30
29
|
{
|
|
31
|
-
type:
|
|
32
|
-
key:
|
|
33
|
-
component:
|
|
34
|
-
defaultValue:
|
|
30
|
+
type: 'DataBind',
|
|
31
|
+
key: 'dataBind',
|
|
32
|
+
component: 'data-bind',
|
|
33
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.dataBind
|
|
35
34
|
},
|
|
36
35
|
{
|
|
37
|
-
key:
|
|
38
|
-
type:
|
|
39
|
-
component:
|
|
36
|
+
key: 'caption',
|
|
37
|
+
type: 'string',
|
|
38
|
+
component: 'input',
|
|
40
39
|
props: {
|
|
41
40
|
maxLength: 80,
|
|
42
41
|
i18n: true
|
|
43
42
|
},
|
|
44
|
-
defaultValue:
|
|
43
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.caption,
|
|
45
44
|
validator: function validator(value) {
|
|
46
45
|
if (!value) {
|
|
47
|
-
return
|
|
46
|
+
return '标题必填';
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
{
|
|
52
|
-
label:
|
|
53
|
-
key:
|
|
54
|
-
type:
|
|
55
|
-
component:
|
|
56
|
-
defaultValue:
|
|
51
|
+
label: '隐藏标题',
|
|
52
|
+
key: 'isHideCaption',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
component: 'switch',
|
|
55
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.isHideCaption,
|
|
57
56
|
props: {
|
|
58
|
-
showType:
|
|
57
|
+
showType: 'checkbox'
|
|
59
58
|
},
|
|
60
59
|
// 在明细表内隐藏
|
|
61
60
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
62
|
-
var
|
|
63
|
-
if (((
|
|
61
|
+
var ref, ref1;
|
|
62
|
+
if (((ref = payload.current) === null || ref === void 0 ? void 0 : ref.type) !== ((ref1 = payload.from) === null || ref1 === void 0 ? void 0 : ref1.type)) {
|
|
64
63
|
//明细子表内默认开启
|
|
65
|
-
if (payload.current.type ===
|
|
66
|
-
driven.setInstance(payload.control,
|
|
64
|
+
if (payload.current.type === 'subtable') {
|
|
65
|
+
driven.setInstance(payload.control, 'isHideCaption', true);
|
|
67
66
|
}
|
|
68
67
|
return {
|
|
69
|
-
visible: payload.current.type !==
|
|
68
|
+
visible: payload.current.type !== 'subtable'
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
},
|
|
74
73
|
{
|
|
75
|
-
key:
|
|
76
|
-
type:
|
|
77
|
-
component:
|
|
78
|
-
defaultValue:
|
|
74
|
+
key: 'labelPosition',
|
|
75
|
+
type: 'string',
|
|
76
|
+
component: 'radio',
|
|
77
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.labelPosition,
|
|
79
78
|
props: {
|
|
80
|
-
showType:
|
|
79
|
+
showType: 'solid',
|
|
81
80
|
options: [
|
|
82
81
|
{
|
|
83
|
-
label:
|
|
84
|
-
value:
|
|
82
|
+
label: '上下布局',
|
|
83
|
+
value: 'top'
|
|
85
84
|
},
|
|
86
85
|
{
|
|
87
|
-
label:
|
|
88
|
-
value:
|
|
89
|
-
}
|
|
86
|
+
label: '左右布局',
|
|
87
|
+
value: 'left'
|
|
88
|
+
},
|
|
90
89
|
]
|
|
91
90
|
}
|
|
92
91
|
},
|
|
93
92
|
{
|
|
94
|
-
key:
|
|
95
|
-
type:
|
|
96
|
-
component:
|
|
97
|
-
defaultValue:
|
|
93
|
+
key: 'defaultState',
|
|
94
|
+
type: 'string',
|
|
95
|
+
component: 'radio',
|
|
96
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.defaultState,
|
|
98
97
|
props: {
|
|
99
|
-
showType:
|
|
98
|
+
showType: 'solid',
|
|
100
99
|
options: [
|
|
101
100
|
{
|
|
102
|
-
label:
|
|
103
|
-
value:
|
|
101
|
+
label: '普通',
|
|
102
|
+
value: 'default'
|
|
104
103
|
},
|
|
105
104
|
{
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
108
|
-
}
|
|
105
|
+
label: '只读',
|
|
106
|
+
value: 'readonly'
|
|
107
|
+
},
|
|
109
108
|
]
|
|
110
109
|
}
|
|
111
110
|
},
|
|
112
111
|
{
|
|
113
|
-
label:
|
|
114
|
-
key:
|
|
115
|
-
type:
|
|
116
|
-
component:
|
|
117
|
-
defaultValue:
|
|
112
|
+
label: '必填',
|
|
113
|
+
key: 'required',
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
component: 'switch',
|
|
116
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.required
|
|
118
117
|
},
|
|
119
118
|
{
|
|
120
|
-
label:
|
|
121
|
-
key:
|
|
122
|
-
type:
|
|
123
|
-
component:
|
|
124
|
-
defaultValue:
|
|
119
|
+
label: '提示文字',
|
|
120
|
+
key: 'placeholder',
|
|
121
|
+
type: 'string',
|
|
122
|
+
component: 'input',
|
|
123
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.placeholder,
|
|
125
124
|
props: {
|
|
126
125
|
maxLength: 80,
|
|
127
126
|
i18n: true
|
|
128
127
|
}
|
|
129
|
-
}
|
|
128
|
+
},
|
|
130
129
|
]);
|
|
131
130
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './createBaseFields';
|
|
2
|
+
export * from './createFormBaseFields';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './defineInstance';
|
|
2
|
+
export * from './initSettings';
|
|
3
|
+
export * from './schema';
|
|
4
|
+
export * from './default';
|
package/dist/esm/initSettings.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _defineProperty(obj, key, value) {
|
|
2
2
|
if (key in obj) {
|
|
3
3
|
Object.defineProperty(obj, key, {
|
|
4
4
|
value: value,
|
|
@@ -11,7 +11,7 @@ function _define_property(obj, key, value) {
|
|
|
11
11
|
}
|
|
12
12
|
return obj;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function _objectSpread(target) {
|
|
15
15
|
for(var i = 1; i < arguments.length; i++){
|
|
16
16
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
17
|
var ownKeys = Object.keys(source);
|
|
@@ -21,60 +21,36 @@ function _object_spread(target) {
|
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
23
23
|
ownKeys.forEach(function(key) {
|
|
24
|
-
|
|
24
|
+
_defineProperty(target, key, source[key]);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
return keys;
|
|
41
|
-
}
|
|
42
|
-
function _object_spread_props(target, source) {
|
|
43
|
-
source = source != null ? source : {};
|
|
44
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
|
-
import { Group, Setting } from "./schema";
|
|
54
|
-
import { CustomProps } from "./props/custom";
|
|
55
|
-
import { InputProps } from "./props/input";
|
|
56
|
-
import { InputNumberProps } from "./props/input-number";
|
|
57
|
-
import { SwitchProps } from "./props/switch";
|
|
58
|
-
import { CheckboxProps } from "./props/checkbox";
|
|
59
|
-
import { SelectProps } from "./props/select";
|
|
60
|
-
import { RadioProps } from "./props/radio";
|
|
61
|
-
import { TextareaProps } from "./props/textarea";
|
|
62
|
-
import { isTabSchema, Tab } from "./schema/tab";
|
|
29
|
+
import { Group, Setting } from './schema';
|
|
30
|
+
import { CustomProps } from './props/custom';
|
|
31
|
+
import { InputProps } from './props/input';
|
|
32
|
+
import { InputNumberProps } from './props/input-number';
|
|
33
|
+
import { SwitchProps } from './props/switch';
|
|
34
|
+
import { CheckboxProps } from './props/checkbox';
|
|
35
|
+
import { SelectProps } from './props/select';
|
|
36
|
+
import { RadioProps } from './props/radio';
|
|
37
|
+
import { TextareaProps } from './props/textarea';
|
|
38
|
+
import { isTabSchema, Tab } from './schema/tab';
|
|
63
39
|
function propsFactory(component, props) {
|
|
64
40
|
switch(component){
|
|
65
|
-
case
|
|
41
|
+
case 'input':
|
|
66
42
|
return new InputProps(props);
|
|
67
|
-
case
|
|
43
|
+
case 'textarea':
|
|
68
44
|
return new TextareaProps(props);
|
|
69
|
-
case
|
|
45
|
+
case 'input-number':
|
|
70
46
|
return new InputNumberProps(props);
|
|
71
|
-
case
|
|
47
|
+
case 'switch':
|
|
72
48
|
return new SwitchProps(props);
|
|
73
|
-
case
|
|
49
|
+
case 'radio':
|
|
74
50
|
return new RadioProps(props);
|
|
75
|
-
case
|
|
51
|
+
case 'checkbox':
|
|
76
52
|
return new CheckboxProps(props);
|
|
77
|
-
case
|
|
53
|
+
case 'select':
|
|
78
54
|
return new SelectProps(props);
|
|
79
55
|
default:
|
|
80
56
|
return new CustomProps(props);
|
|
@@ -86,14 +62,14 @@ function buildSettingItem(settingMap) {
|
|
|
86
62
|
if (!schema) {
|
|
87
63
|
return;
|
|
88
64
|
}
|
|
89
|
-
return new Setting(
|
|
90
|
-
props: propsFactory(schema.component,
|
|
65
|
+
return new Setting(_objectSpread({}, schema, {
|
|
66
|
+
props: propsFactory(schema.component, 'props' in schema ? schema.props : undefined)
|
|
91
67
|
}));
|
|
92
68
|
};
|
|
93
69
|
}
|
|
94
70
|
export function initSettings(params) {
|
|
95
71
|
var generatorGroup = function generatorGroup(group) {
|
|
96
|
-
return new Group(
|
|
72
|
+
return new Group(_objectSpread({}, group, {
|
|
97
73
|
items: group.items.map(buildSettingItem(settingMap)).filter(Boolean)
|
|
98
74
|
}));
|
|
99
75
|
};
|
|
@@ -106,7 +82,7 @@ export function initSettings(params) {
|
|
|
106
82
|
}, new Map());
|
|
107
83
|
return params.groups.map(function(item) {
|
|
108
84
|
if (isTabSchema(item)) {
|
|
109
|
-
return new Tab(
|
|
85
|
+
return new Tab(_objectSpread({}, item, {
|
|
110
86
|
items: generatorGroups(item.items)
|
|
111
87
|
}));
|
|
112
88
|
} else {
|
package/dist/esm/props/base.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _classCallCheck(instance, Constructor) {
|
|
2
2
|
if (!(instance instanceof Constructor)) {
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
@@ -12,47 +12,23 @@ function _defineProperties(target, props) {
|
|
|
12
12
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
16
16
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
17
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
18
|
return Constructor;
|
|
19
19
|
}
|
|
20
|
-
function _define_property(obj, key, value) {
|
|
21
|
-
if (key in obj) {
|
|
22
|
-
Object.defineProperty(obj, key, {
|
|
23
|
-
value: value,
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true
|
|
27
|
-
});
|
|
28
|
-
} else {
|
|
29
|
-
obj[key] = value;
|
|
30
|
-
}
|
|
31
|
-
return obj;
|
|
32
|
-
}
|
|
33
20
|
export var BaseProps = /*#__PURE__*/ function() {
|
|
34
21
|
"use strict";
|
|
35
22
|
function BaseProps(props) {
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* */ _define_property(this, "expression", void 0);
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* 是否改变父属性
|
|
47
|
-
*/ _define_property(this, "updateParent", void 0);
|
|
48
|
-
var _props_visible;
|
|
49
|
-
this.visible = (_props_visible = (_props = props) === null || _props === void 0 ? void 0 : _props.visible) !== null && _props_visible !== void 0 ? _props_visible : true;
|
|
50
|
-
var _props_expression;
|
|
51
|
-
this.expression = (_props_expression = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.expression) !== null && _props_expression !== void 0 ? _props_expression : false;
|
|
52
|
-
var _props_updateParent;
|
|
53
|
-
this.updateParent = (_props_updateParent = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.updateParent) !== null && _props_updateParent !== void 0 ? _props_updateParent : false;
|
|
23
|
+
_classCallCheck(this, BaseProps);
|
|
24
|
+
var ref;
|
|
25
|
+
this.visible = (ref = props === null || props === void 0 ? void 0 : props.visible) !== null && ref !== void 0 ? ref : true;
|
|
26
|
+
var ref1;
|
|
27
|
+
this.expression = (ref1 = props === null || props === void 0 ? void 0 : props.expression) !== null && ref1 !== void 0 ? ref1 : false;
|
|
28
|
+
var ref2;
|
|
29
|
+
this.updateParent = (ref2 = props === null || props === void 0 ? void 0 : props.updateParent) !== null && ref2 !== void 0 ? ref2 : false;
|
|
54
30
|
}
|
|
55
|
-
|
|
31
|
+
_createClass(BaseProps, [
|
|
56
32
|
{
|
|
57
33
|
key: "isAtomicComponent",
|
|
58
34
|
get: function get() {
|