@lingxiteam/assets 1.0.12 → 1.0.13-alpha.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/es/dealDsl/index.d.ts +1 -2
- package/es/dealDsl/index.js +1 -2
- package/es/dealDsl/preprocess/common.js +179 -37
- package/es/dealDsl/preprocessDSL.d.ts +2 -14
- package/es/dealDsl/preprocessDSL.js +2 -42
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +6 -2
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +25 -0
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +187 -43
- package/es/error/errorDisplay/Web/Notification/Notice.js +5 -1
- package/es/error/errorDisplay/Web/Notification/Notification.js +10 -3
- package/es/error/errorDisplay/Web/Notification/Notification.less +13 -1
- package/es/error/errorDisplay/Web/Notification/index.js +8 -9
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +3 -1
- package/es/error/errorDisplay/compUtils.js +17 -1
- package/es/error/errorDisplay/const.js +1 -1
- package/es/error/errorDisplay/http.js +1 -1
- package/es/error/index.js +3 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/rootConfig/mobile/BusiComp.d.ts +5 -0
- package/es/rootConfig/mobile/BusiComp.js +32 -3
- package/es/rootConfig/mobile/MobileModal.d.ts +13 -5
- package/es/rootConfig/mobile/MobileModal.js +38 -9
- package/es/rootConfig/mobile/MobilePopover.d.ts +5 -0
- package/es/rootConfig/mobile/MobilePopover.js +31 -2
- package/es/rootConfig/mobile/page.d.ts +25 -5
- package/es/rootConfig/mobile/page.js +70 -10
- package/es/rootConfig/pc/BusiComp.d.ts +4 -0
- package/es/rootConfig/pc/BusiComp.js +64 -3
- package/es/rootConfig/pc/Drawer.d.ts +12 -0
- package/es/rootConfig/pc/Drawer.js +68 -2
- package/es/rootConfig/pc/Modal.d.ts +6 -0
- package/es/rootConfig/pc/Modal.js +62 -2
- package/es/rootConfig/pc/Popover.d.ts +5 -0
- package/es/rootConfig/pc/Popover.js +58 -2
- package/es/rootConfig/pc/page.d.ts +25 -10
- package/es/rootConfig/pc/page.js +103 -15
- package/es/rootConfig/todoActionList.d.ts +170 -50
- package/es/rootConfig/todoActionList.js +221 -70
- package/es/rootConfig/todoOptionList.d.ts +38 -6
- package/es/rootConfig/todoOptionList.js +44 -6
- package/es/security/encipher/sign.js +8 -1
- package/es/security/encipher/token.d.ts +3 -0
- package/es/security/encipher/token.js +30 -0
- package/es/security/index.d.ts +2 -0
- package/es/security/index.js +4 -1
- package/es/theme/bin/default/modalWidth.js +8 -0
- package/es/theme/bin/default/theme.js +282 -207
- package/es/theme/bin/default/theme.less +282 -207
- package/es/theme/bin/default/theme.scss +282 -207
- package/es/theme/build.js +9 -0
- package/es/theme/src/default/index.js +169 -61
- package/es/theme/utils/renderColors.js +13 -2
- package/es/utils/cookieUtil.js +36 -0
- package/lib/dealDsl/index.d.ts +1 -2
- package/lib/dealDsl/index.js +1 -20
- package/lib/dealDsl/preprocess/common.js +179 -37
- package/lib/dealDsl/preprocessDSL.d.ts +2 -14
- package/lib/dealDsl/preprocessDSL.js +4 -46
- package/lib/error/errorDisplay/Web/Drawer/Drawer.js +6 -2
- package/lib/error/errorDisplay/Web/Drawer/Drawer.less +25 -0
- package/lib/error/errorDisplay/Web/ErrorMsg/index.js +186 -43
- package/lib/error/errorDisplay/Web/Notification/Notice.js +5 -1
- package/lib/error/errorDisplay/Web/Notification/Notification.js +10 -3
- package/lib/error/errorDisplay/Web/Notification/Notification.less +13 -1
- package/lib/error/errorDisplay/Web/Notification/index.js +8 -9
- package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +2 -1
- package/lib/error/errorDisplay/compUtils.js +19 -1
- package/lib/error/errorDisplay/const.js +1 -1
- package/lib/error/errorDisplay/http.js +1 -1
- package/lib/error/index.js +14 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +14 -0
- package/lib/rootConfig/mobile/BusiComp.d.ts +5 -0
- package/lib/rootConfig/mobile/BusiComp.js +32 -3
- package/lib/rootConfig/mobile/MobileModal.d.ts +13 -5
- package/lib/rootConfig/mobile/MobileModal.js +38 -9
- package/lib/rootConfig/mobile/MobilePopover.d.ts +5 -0
- package/lib/rootConfig/mobile/MobilePopover.js +31 -2
- package/lib/rootConfig/mobile/page.d.ts +25 -5
- package/lib/rootConfig/mobile/page.js +70 -10
- package/lib/rootConfig/pc/BusiComp.d.ts +4 -0
- package/lib/rootConfig/pc/BusiComp.js +64 -3
- package/lib/rootConfig/pc/Drawer.d.ts +12 -0
- package/lib/rootConfig/pc/Drawer.js +68 -2
- package/lib/rootConfig/pc/Modal.d.ts +6 -0
- package/lib/rootConfig/pc/Modal.js +62 -2
- package/lib/rootConfig/pc/Popover.d.ts +5 -0
- package/lib/rootConfig/pc/Popover.js +58 -2
- package/lib/rootConfig/pc/page.d.ts +25 -10
- package/lib/rootConfig/pc/page.js +103 -15
- package/lib/rootConfig/todoActionList.d.ts +170 -50
- package/lib/rootConfig/todoActionList.js +221 -70
- package/lib/rootConfig/todoOptionList.d.ts +38 -6
- package/lib/rootConfig/todoOptionList.js +44 -6
- package/lib/security/encipher/sign.js +9 -1
- package/lib/security/encipher/token.d.ts +3 -0
- package/lib/security/encipher/token.js +38 -0
- package/lib/security/index.d.ts +2 -0
- package/lib/security/index.js +4 -1
- package/lib/theme/bin/default/modalWidth.js +15 -0
- package/lib/theme/bin/default/theme.js +282 -207
- package/lib/theme/bin/default/theme.less +282 -207
- package/lib/theme/bin/default/theme.scss +282 -207
- package/lib/theme/build.js +9 -0
- package/lib/theme/src/default/index.js +169 -61
- package/lib/theme/utils/renderColors.js +13 -2
- package/lib/utils/cookieUtil.js +43 -0
- package/package.json +1 -1
- package/es/dealDsl/events/actionObj.d.ts +0 -3
- package/es/dealDsl/events/actionObj.js +0 -6
- package/es/dealDsl/events/index.d.ts +0 -6
- package/es/dealDsl/events/index.js +0 -14
- package/es/dealDsl/preprocess/editor.d.ts +0 -9
- package/es/dealDsl/preprocess/editor.js +0 -21
- package/es/dealDsl/preprocess/engine.d.ts +0 -9
- package/es/dealDsl/preprocess/engine.js +0 -19
- package/es/theme/bin/cucc/theme.js +0 -275
- package/es/theme/bin/cucc/theme.less +0 -272
- package/es/theme/bin/cucc/theme.scss +0 -272
- package/es/theme/src/cucc/index.js +0 -131
- package/lib/dealDsl/events/actionObj.d.ts +0 -3
- package/lib/dealDsl/events/actionObj.js +0 -13
- package/lib/dealDsl/events/index.d.ts +0 -6
- package/lib/dealDsl/events/index.js +0 -21
- package/lib/dealDsl/preprocess/editor.d.ts +0 -9
- package/lib/dealDsl/preprocess/editor.js +0 -28
- package/lib/dealDsl/preprocess/engine.d.ts +0 -9
- package/lib/dealDsl/preprocess/engine.js +0 -26
- package/lib/theme/bin/cucc/theme.js +0 -277
- package/lib/theme/bin/cucc/theme.less +0 -272
- package/lib/theme/bin/cucc/theme.scss +0 -272
- package/lib/theme/src/cucc/index.js +0 -133
package/es/dealDsl/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { preprocessDSL
|
|
2
|
-
export { parseActionBefore } from './events';
|
|
1
|
+
export { preprocessDSL } from './preprocessDSL';
|
package/es/dealDsl/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { preprocessDSL
|
|
2
|
-
export { parseActionBefore } from './events';
|
|
1
|
+
export { preprocessDSL } from './preprocessDSL';
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
import { hasSomeOwnProperty, hasEveryOwnProperty } from '../utils';
|
|
2
3
|
var h5 = {
|
|
3
|
-
|
|
4
|
+
Button: function Button() {
|
|
4
5
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5
6
|
var _component$props = component.props,
|
|
6
7
|
props = _component$props === void 0 ? {} : _component$props;
|
|
7
|
-
|
|
8
|
+
// 兼容存量数据不存在 hasIcon(是否有图标开关标识)
|
|
9
|
+
if ((props === null || props === void 0 ? void 0 : props.icontype) && JSON.stringify(props.icontype) !== '{}') {
|
|
10
|
+
props.btnIcon = true;
|
|
11
|
+
} else {
|
|
12
|
+
props.btnIcon = false;
|
|
13
|
+
}
|
|
14
|
+
return component;
|
|
15
|
+
},
|
|
16
|
+
Icon: function Icon() {
|
|
17
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
|
+
var _component$props2 = component.props,
|
|
19
|
+
props = _component$props2 === void 0 ? {} : _component$props2;
|
|
20
|
+
if (props.type && _typeof(props.type) === 'object') {
|
|
8
21
|
props.icon = props.type;
|
|
9
22
|
delete props.type;
|
|
10
23
|
}
|
|
@@ -12,18 +25,27 @@ var h5 = {
|
|
|
12
25
|
},
|
|
13
26
|
Divider: function Divider() {
|
|
14
27
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15
|
-
var _component$
|
|
16
|
-
props = _component$
|
|
28
|
+
var _component$props3 = component.props,
|
|
29
|
+
props = _component$props3 === void 0 ? {} : _component$props3;
|
|
17
30
|
if (props.status !== undefined) {
|
|
18
31
|
props.visible = props.status;
|
|
19
32
|
delete props.status;
|
|
20
33
|
}
|
|
21
34
|
return component;
|
|
22
35
|
},
|
|
36
|
+
'DatePicker|Calendar|Picker': function DatePickerCalendarPicker() {
|
|
37
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
38
|
+
// TODO: 1.0.9 版本数据兼容
|
|
39
|
+
if (!component.props.hasOwnProperty('visible')) {
|
|
40
|
+
component.props.visible = false;
|
|
41
|
+
}
|
|
42
|
+
;
|
|
43
|
+
return component;
|
|
44
|
+
},
|
|
23
45
|
DformDate: function DformDate() {
|
|
24
46
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
25
|
-
var _component$
|
|
26
|
-
props = _component$
|
|
47
|
+
var _component$props4 = component.props,
|
|
48
|
+
props = _component$props4 === void 0 ? {} : _component$props4;
|
|
27
49
|
var isCurrent = props.isCurrent,
|
|
28
50
|
defaultValue = props.defaultValue,
|
|
29
51
|
customTime = props.customTime;
|
|
@@ -50,22 +72,24 @@ var h5 = {
|
|
|
50
72
|
},
|
|
51
73
|
'DMultiplePicker|DformDate|DformInput|DformSelect|DformPicker': function DMultiplePickerDformDateDformInputDformSelectDformPicker() {
|
|
52
74
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
53
|
-
var _component$
|
|
54
|
-
props = _component$
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
var _component$props5 = component.props,
|
|
76
|
+
props = _component$props5 === void 0 ? {} : _component$props5;
|
|
77
|
+
if (props.hasOwnProperty('type')) {
|
|
78
|
+
delete props.type;
|
|
79
|
+
delete props.theme;
|
|
80
|
+
delete props.fontAddress;
|
|
81
|
+
delete props.isIconFont;
|
|
82
|
+
delete props.iconFileInfo;
|
|
83
|
+
delete props.svgContent;
|
|
84
|
+
delete props.iconFile;
|
|
85
|
+
}
|
|
62
86
|
return component;
|
|
63
87
|
},
|
|
64
88
|
DformFile: function DformFile() {
|
|
65
89
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
66
90
|
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
67
|
-
var _component$
|
|
68
|
-
props = _component$
|
|
91
|
+
var _component$props6 = component.props,
|
|
92
|
+
props = _component$props6 === void 0 ? {} : _component$props6;
|
|
69
93
|
var accept = props.accept,
|
|
70
94
|
acceptExtension = props.acceptExtension;
|
|
71
95
|
if (props.hasOwnProperty('accept')) {
|
|
@@ -80,21 +104,42 @@ var h5 = {
|
|
|
80
104
|
},
|
|
81
105
|
'Image|DformFile|DformImagePicker|Signature': function ImageDformFileDformImagePickerSignature() {
|
|
82
106
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
83
|
-
var _component$
|
|
84
|
-
props = _component$
|
|
107
|
+
var _component$props7 = component.props,
|
|
108
|
+
props = _component$props7 === void 0 ? {} : _component$props7;
|
|
85
109
|
if (props.hasOwnProperty('action')) {
|
|
86
110
|
// 旧数据含有action,实际用到的值和columns当中的api是相同
|
|
87
111
|
props.columns.api = props.action;
|
|
88
112
|
delete props.action;
|
|
89
113
|
}
|
|
90
114
|
return component;
|
|
115
|
+
},
|
|
116
|
+
// 兼容处理下存量的身份证校验规则
|
|
117
|
+
'DformInput|Input': function DformInputInput(component) {
|
|
118
|
+
var _component$props8 = component === null || component === void 0 ? void 0 : component.props,
|
|
119
|
+
regexp = _component$props8.regexp;
|
|
120
|
+
if (Array.isArray(regexp)) {
|
|
121
|
+
var oldRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[12])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
122
|
+
var newRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
123
|
+
// 运行态会给正则加上$$符号
|
|
124
|
+
var idCardRegexp = regexp.find(function (reg) {
|
|
125
|
+
return reg.pattern === "$".concat(oldRegStr, "$") || reg.pattern === oldRegStr;
|
|
126
|
+
});
|
|
127
|
+
if (idCardRegexp) {
|
|
128
|
+
if (/^\$.+\$$/.test(idCardRegexp.pattern)) {
|
|
129
|
+
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
130
|
+
} else {
|
|
131
|
+
idCardRegexp.pattern = newRegStr;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return component;
|
|
91
136
|
}
|
|
92
137
|
};
|
|
93
138
|
var pc = {
|
|
94
139
|
'DatePicker|TimePicker': function DatePickerTimePicker() {
|
|
95
140
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
96
|
-
var _component$
|
|
97
|
-
props = _component$
|
|
141
|
+
var _component$props9 = component.props,
|
|
142
|
+
props = _component$props9 === void 0 ? {} : _component$props9;
|
|
98
143
|
var isCurrent = props.isCurrent,
|
|
99
144
|
defaultValue = props.defaultValue,
|
|
100
145
|
customTime = props.customTime;
|
|
@@ -121,8 +166,8 @@ var pc = {
|
|
|
121
166
|
},
|
|
122
167
|
Button: function Button() {
|
|
123
168
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
124
|
-
var _component$
|
|
125
|
-
props = _component$
|
|
169
|
+
var _component$props10 = component.props,
|
|
170
|
+
props = _component$props10 === void 0 ? {} : _component$props10;
|
|
126
171
|
// const { popoverSetting, showPopover } = props;
|
|
127
172
|
if (props.iconType && !props.icon) {
|
|
128
173
|
var theme = props.theme,
|
|
@@ -147,19 +192,34 @@ var pc = {
|
|
|
147
192
|
delete props.iconFileInfo;
|
|
148
193
|
delete props.svgContent;
|
|
149
194
|
delete props.iconFile;
|
|
195
|
+
// 兼容存量数据不存在 hasIcon(是否有图标开关标识)
|
|
196
|
+
if ((props === null || props === void 0 ? void 0 : props.icon) && JSON.stringify(props.icon) !== '{}') {
|
|
197
|
+
props.hasIcon = true;
|
|
198
|
+
} else {
|
|
199
|
+
props.hasIcon = false;
|
|
200
|
+
}
|
|
150
201
|
return component;
|
|
151
202
|
},
|
|
152
203
|
'Dropdown|Menu': function DropdownMenu() {
|
|
153
204
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
154
|
-
var _component$
|
|
155
|
-
props = _component$
|
|
205
|
+
var _component$props11 = component.props,
|
|
206
|
+
props = _component$props11 === void 0 ? {} : _component$props11;
|
|
156
207
|
delete props.iconInfo;
|
|
157
208
|
return component;
|
|
158
209
|
},
|
|
159
210
|
'Input|Card|Collapse': function InputCardCollapse() {
|
|
160
211
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
161
|
-
var _component$
|
|
162
|
-
props = _component$
|
|
212
|
+
var _component$props12 = component.props,
|
|
213
|
+
props = _component$props12 === void 0 ? {} : _component$props12;
|
|
214
|
+
if (!props.icon) {
|
|
215
|
+
props.icon = {
|
|
216
|
+
type: props.type,
|
|
217
|
+
theme: props.theme || "outlined",
|
|
218
|
+
fontAddress: "",
|
|
219
|
+
isIconFont: false,
|
|
220
|
+
iconFileInfo: {}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
163
223
|
delete props.type;
|
|
164
224
|
delete props.theme;
|
|
165
225
|
delete props.fontAddress;
|
|
@@ -167,6 +227,15 @@ var pc = {
|
|
|
167
227
|
delete props.iconFileInfo;
|
|
168
228
|
delete props.svgContent;
|
|
169
229
|
delete props.iconFile;
|
|
230
|
+
if (!props.prefixIcon) {
|
|
231
|
+
props.prefixIcon = {
|
|
232
|
+
type: props.prefixIconType,
|
|
233
|
+
theme: props.prefixIconTheme || "outlined",
|
|
234
|
+
fontAddress: "",
|
|
235
|
+
isIconFont: false,
|
|
236
|
+
iconFileInfo: {}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
170
239
|
delete props.prefixIconIconFileInfo;
|
|
171
240
|
delete props.prefixIconIsIconFont;
|
|
172
241
|
delete props.prefixIconType;
|
|
@@ -177,8 +246,17 @@ var pc = {
|
|
|
177
246
|
},
|
|
178
247
|
'StdUpload|Icon': function StdUploadIcon() {
|
|
179
248
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
180
|
-
var _component$
|
|
181
|
-
props = _component$
|
|
249
|
+
var _component$props13 = component.props,
|
|
250
|
+
props = _component$props13 === void 0 ? {} : _component$props13;
|
|
251
|
+
if (!props.icon) {
|
|
252
|
+
props.icon = {
|
|
253
|
+
type: props.type,
|
|
254
|
+
theme: props.theme || "outlined",
|
|
255
|
+
fontAddress: "",
|
|
256
|
+
isIconFont: false,
|
|
257
|
+
iconFileInfo: {}
|
|
258
|
+
};
|
|
259
|
+
}
|
|
182
260
|
delete props.type;
|
|
183
261
|
delete props.theme;
|
|
184
262
|
delete props.fontAddress;
|
|
@@ -190,8 +268,8 @@ var pc = {
|
|
|
190
268
|
},
|
|
191
269
|
Table: function Table() {
|
|
192
270
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
193
|
-
var _component$
|
|
194
|
-
props = _component$
|
|
271
|
+
var _component$props14 = component.props,
|
|
272
|
+
props = _component$props14 === void 0 ? {} : _component$props14;
|
|
195
273
|
if (typeof props.showCustom === 'boolean') {
|
|
196
274
|
// 旧数据
|
|
197
275
|
var iconPosition = props.iconPosition,
|
|
@@ -223,11 +301,31 @@ var pc = {
|
|
|
223
301
|
delete props.customStyle;
|
|
224
302
|
delete props.iconFile;
|
|
225
303
|
}
|
|
304
|
+
// 预处理内容列配置
|
|
305
|
+
var columns = props === null || props === void 0 ? void 0 : props.columns;
|
|
306
|
+
if (Array.isArray(columns)) {
|
|
307
|
+
props.columns = columns.map(function (colCfg) {
|
|
308
|
+
/**
|
|
309
|
+
* 1、兼容存量没有 editContent 情况:默认改为 -> 提示方式为默认提示 -> 提示内容为初始数据
|
|
310
|
+
* 2、false 假值表示:提示方式为无
|
|
311
|
+
*/
|
|
312
|
+
if (!(colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) && typeof (colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) !== 'boolean') {
|
|
313
|
+
colCfg.editContent = {
|
|
314
|
+
edittype: 'title',
|
|
315
|
+
title: {
|
|
316
|
+
"code": "$function main(text, row, index) { return text;}$",
|
|
317
|
+
"originCode": ["/**", " * 计算绑定的内容", " * @param {String} text 行数据中数据字段对应的原始值", " * @param {Object} row 行数据对象", " * @param {Number} index 行索引", " * @returns {Boolean} 实际值", " * 例:return row.id,表示当行主键为id时,返回内容为row.id实际的值", " */", "function main(text, row, index) {", " return text;", "}"]
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
return colCfg;
|
|
322
|
+
});
|
|
323
|
+
}
|
|
226
324
|
return component;
|
|
227
325
|
},
|
|
228
326
|
Upload: function Upload(component) {
|
|
229
|
-
var _component$
|
|
230
|
-
props = _component$
|
|
327
|
+
var _component$props15 = component.props,
|
|
328
|
+
props = _component$props15 === void 0 ? {} : _component$props15;
|
|
231
329
|
if (props.hasOwnProperty('action')) {
|
|
232
330
|
// 旧数据含有action
|
|
233
331
|
props.columns.api = props.action;
|
|
@@ -251,12 +349,56 @@ var pc = {
|
|
|
251
349
|
}
|
|
252
350
|
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
253
351
|
if (props.hasOwnProperty('accept')) {
|
|
254
|
-
props.uploadAccepType
|
|
255
|
-
|
|
352
|
+
props.uploadAccepType = Object.assign({}, props.uploadAccepType, {
|
|
353
|
+
accept: accept
|
|
354
|
+
});
|
|
355
|
+
delete props.accept;
|
|
256
356
|
}
|
|
257
357
|
if (props.hasOwnProperty('acceptExtension')) {
|
|
258
|
-
props.uploadAccepType
|
|
259
|
-
|
|
358
|
+
props.uploadAccepType = Object.assign({}, props.uploadAccepType, {
|
|
359
|
+
acceptExtension: acceptExtension
|
|
360
|
+
});
|
|
361
|
+
delete props.acceptExtension;
|
|
362
|
+
}
|
|
363
|
+
return component;
|
|
364
|
+
},
|
|
365
|
+
TreeSelect: function TreeSelect(component) {
|
|
366
|
+
var props = component.props;
|
|
367
|
+
var multiple = props.multiple,
|
|
368
|
+
treeNodeFilterProp = props.treeNodeFilterProp,
|
|
369
|
+
treeCheckable = props.treeCheckable,
|
|
370
|
+
_props$filter = props.filter,
|
|
371
|
+
filter = _props$filter === void 0 ? 'local' : _props$filter;
|
|
372
|
+
if (props.hasOwnProperty('multiple')) {
|
|
373
|
+
// 废除multiple,多选统一设置为treeCheckable
|
|
374
|
+
component.props.treeCheckable = multiple || treeCheckable;
|
|
375
|
+
delete props.multiple;
|
|
376
|
+
}
|
|
377
|
+
if (props.hasOwnProperty('treeNodeFilterProp')) {
|
|
378
|
+
// 以前设置了过滤搜索值的,统一设置为本地过滤
|
|
379
|
+
component.props.filter = treeNodeFilterProp ? 'local' : filter;
|
|
380
|
+
delete props.treeNodeFilterProp;
|
|
381
|
+
}
|
|
382
|
+
return component;
|
|
383
|
+
},
|
|
384
|
+
Input: function Input(component) {
|
|
385
|
+
// 兼容处理下存量的身份证校验规则
|
|
386
|
+
var _component$props16 = component === null || component === void 0 ? void 0 : component.props,
|
|
387
|
+
regexp = _component$props16.regexp;
|
|
388
|
+
if (Array.isArray(regexp)) {
|
|
389
|
+
var oldRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[12])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
390
|
+
var newRegStr = "/^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|X)$/";
|
|
391
|
+
// 运行态会给正则加上$$符号
|
|
392
|
+
var idCardRegexp = regexp.find(function (reg) {
|
|
393
|
+
return reg.pattern === "$".concat(oldRegStr, "$") || reg.pattern === oldRegStr;
|
|
394
|
+
});
|
|
395
|
+
if (idCardRegexp) {
|
|
396
|
+
if (/^\$.+\$$/.test(idCardRegexp.pattern)) {
|
|
397
|
+
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
398
|
+
} else {
|
|
399
|
+
idCardRegexp.pattern = newRegStr;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
260
402
|
}
|
|
261
403
|
return component;
|
|
262
404
|
}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type { ContextType } from "./PropType";
|
|
2
2
|
/**
|
|
3
|
-
* 本方法只处理运行态和配置态公共属性.
|
|
4
|
-
*
|
|
3
|
+
* 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
|
|
4
|
+
* 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
|
|
5
5
|
* @param component
|
|
6
6
|
* @param context
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
9
|
export declare const preprocessDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
|
|
10
|
-
/**
|
|
11
|
-
* 预处理DSL数据, 本方法仅在编辑器端使用。 处理后数据的权重高于preprocessDSL。
|
|
12
|
-
* @param component 组件JSON数据
|
|
13
|
-
* @param context 上下文
|
|
14
|
-
*/
|
|
15
|
-
export declare const preprocessEditorDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
|
|
16
|
-
/**
|
|
17
|
-
* 预处理DSL数据,本方法仅在运行态端使用。 处理后数据的权重高于preprocessDSL。
|
|
18
|
-
* @param component 组件JSON数据
|
|
19
|
-
* @param context 上下文
|
|
20
|
-
*/
|
|
21
|
-
export declare const preprocessEngineDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import preprocessObj from "./preprocess/common";
|
|
2
|
-
import preEditorObj from "./preprocess/editor";
|
|
3
|
-
import preEngineObj from "./preprocess/engine";
|
|
4
2
|
/**
|
|
5
3
|
* 支持属性key通过 "compName|compName"模式
|
|
6
4
|
* @param compName
|
|
@@ -18,8 +16,8 @@ var collectionMethods = function collectionMethods(compName, obj) {
|
|
|
18
16
|
return funcs;
|
|
19
17
|
};
|
|
20
18
|
/**
|
|
21
|
-
* 本方法只处理运行态和配置态公共属性.
|
|
22
|
-
*
|
|
19
|
+
* 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
|
|
20
|
+
* 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
|
|
23
21
|
* @param component
|
|
24
22
|
* @param context
|
|
25
23
|
* @returns
|
|
@@ -37,42 +35,4 @@ export var preprocessDSL = function preprocessDSL(component, context) {
|
|
|
37
35
|
targetComponents = (_fn = fn(targetComponents)) !== null && _fn !== void 0 ? _fn : targetComponents;
|
|
38
36
|
});
|
|
39
37
|
return targetComponents;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* 预处理DSL数据, 本方法仅在编辑器端使用。 处理后数据的权重高于preprocessDSL。
|
|
43
|
-
* @param component 组件JSON数据
|
|
44
|
-
* @param context 上下文
|
|
45
|
-
*/
|
|
46
|
-
export var preprocessEditorDSL = function preprocessEditorDSL(component, context) {
|
|
47
|
-
var targetComponents = component;
|
|
48
|
-
var _ref2 = component || {},
|
|
49
|
-
compName = _ref2.compName;
|
|
50
|
-
var _context$isMobile2 = context.isMobile,
|
|
51
|
-
isMobile = _context$isMobile2 === void 0 ? false : _context$isMobile2;
|
|
52
|
-
var platform = isMobile ? 'h5' : 'pc';
|
|
53
|
-
var methods = collectionMethods(compName, preEditorObj === null || preEditorObj === void 0 ? void 0 : preEditorObj[platform]);
|
|
54
|
-
methods.forEach(function (fn) {
|
|
55
|
-
var _fn2;
|
|
56
|
-
targetComponents = (_fn2 = fn(targetComponents)) !== null && _fn2 !== void 0 ? _fn2 : targetComponents;
|
|
57
|
-
});
|
|
58
|
-
return targetComponents;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* 预处理DSL数据,本方法仅在运行态端使用。 处理后数据的权重高于preprocessDSL。
|
|
62
|
-
* @param component 组件JSON数据
|
|
63
|
-
* @param context 上下文
|
|
64
|
-
*/
|
|
65
|
-
export var preprocessEngineDSL = function preprocessEngineDSL(component, context) {
|
|
66
|
-
var targetComponents = component;
|
|
67
|
-
var _ref3 = component || {},
|
|
68
|
-
compName = _ref3.compName;
|
|
69
|
-
var _context$isMobile3 = context.isMobile,
|
|
70
|
-
isMobile = _context$isMobile3 === void 0 ? false : _context$isMobile3;
|
|
71
|
-
var platform = isMobile ? 'h5' : 'pc';
|
|
72
|
-
var methods = collectionMethods(compName, preEngineObj === null || preEngineObj === void 0 ? void 0 : preEngineObj[platform]);
|
|
73
|
-
methods.forEach(function (fn) {
|
|
74
|
-
var _fn3;
|
|
75
|
-
targetComponents = (_fn3 = fn(targetComponents)) !== null && _fn3 !== void 0 ? _fn3 : targetComponents;
|
|
76
|
-
});
|
|
77
|
-
return targetComponents;
|
|
78
38
|
};
|
|
@@ -46,7 +46,8 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
46
46
|
_props$errorInfoProps = props.errorInfoProps,
|
|
47
47
|
errorInfoProps = _props$errorInfoProps === void 0 ? {
|
|
48
48
|
tabs: []
|
|
49
|
-
} : _props$errorInfoProps
|
|
49
|
+
} : _props$errorInfoProps,
|
|
50
|
+
subTitle = props.subTitle;
|
|
50
51
|
var _useState = useState([]),
|
|
51
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
52
53
|
extraConts = _useState2[0],
|
|
@@ -191,7 +192,10 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
191
192
|
tabsContent = errorInfoProps.tabsContent,
|
|
192
193
|
tabsFooter = errorInfoProps.tabsFooter,
|
|
193
194
|
onTabsChange = errorInfoProps.onTabsChange;
|
|
194
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isDomEle(
|
|
195
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isDomEle(subTitle) ? /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
className: "lx-drawer-sub-title",
|
|
197
|
+
title: subTitle
|
|
198
|
+
}, subTitle) : null, isDomEle(content) ? /*#__PURE__*/React.createElement("div", {
|
|
195
199
|
className: "lx-drawer-code-desc"
|
|
196
200
|
}, content) : null, /*#__PURE__*/React.createElement("div", {
|
|
197
201
|
className: classnames('lx-drawer-code-tabs', {
|
|
@@ -387,6 +387,18 @@
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
&-sub-title {
|
|
391
|
+
background-color: rgba(28, 36, 46, 0.04);
|
|
392
|
+
color: rgba(28, 36, 46, 0.55);
|
|
393
|
+
height: 32px;
|
|
394
|
+
line-height: 32px;
|
|
395
|
+
padding: 0 16px;
|
|
396
|
+
white-space: nowrap;
|
|
397
|
+
text-overflow: ellipsis;
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
font-size: 12px;
|
|
400
|
+
}
|
|
401
|
+
|
|
390
402
|
&-btn {
|
|
391
403
|
display: inline-block;
|
|
392
404
|
padding: 0 15px;
|
|
@@ -399,6 +411,19 @@
|
|
|
399
411
|
border-color: rgb(112, 158, 250);
|
|
400
412
|
color: rgb(112, 158, 250);
|
|
401
413
|
}
|
|
414
|
+
&-disabled {
|
|
415
|
+
cursor: not-allowed;
|
|
416
|
+
pointer-events: none;
|
|
417
|
+
&,
|
|
418
|
+
&:hover,
|
|
419
|
+
&:focus,
|
|
420
|
+
&:active {
|
|
421
|
+
border-color: #e5e5e5 !important;
|
|
422
|
+
color: rgba(28,36,46,0.65) !important;
|
|
423
|
+
background-color: #e5e5e5 !important;
|
|
424
|
+
opacity: 1;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
402
427
|
}
|
|
403
428
|
|
|
404
429
|
&-btn&-btn-primary {
|