@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
|
@@ -5,12 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../utils");
|
|
8
|
+
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); }
|
|
8
9
|
var h5 = {
|
|
9
|
-
|
|
10
|
+
Button: function Button() {
|
|
10
11
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11
12
|
var _component$props = component.props,
|
|
12
13
|
props = _component$props === void 0 ? {} : _component$props;
|
|
13
|
-
|
|
14
|
+
// 兼容存量数据不存在 hasIcon(是否有图标开关标识)
|
|
15
|
+
if ((props === null || props === void 0 ? void 0 : props.icontype) && JSON.stringify(props.icontype) !== '{}') {
|
|
16
|
+
props.btnIcon = true;
|
|
17
|
+
} else {
|
|
18
|
+
props.btnIcon = false;
|
|
19
|
+
}
|
|
20
|
+
return component;
|
|
21
|
+
},
|
|
22
|
+
Icon: function Icon() {
|
|
23
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
24
|
+
var _component$props2 = component.props,
|
|
25
|
+
props = _component$props2 === void 0 ? {} : _component$props2;
|
|
26
|
+
if (props.type && _typeof(props.type) === 'object') {
|
|
14
27
|
props.icon = props.type;
|
|
15
28
|
delete props.type;
|
|
16
29
|
}
|
|
@@ -18,18 +31,27 @@ var h5 = {
|
|
|
18
31
|
},
|
|
19
32
|
Divider: function Divider() {
|
|
20
33
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
|
-
var _component$
|
|
22
|
-
props = _component$
|
|
34
|
+
var _component$props3 = component.props,
|
|
35
|
+
props = _component$props3 === void 0 ? {} : _component$props3;
|
|
23
36
|
if (props.status !== undefined) {
|
|
24
37
|
props.visible = props.status;
|
|
25
38
|
delete props.status;
|
|
26
39
|
}
|
|
27
40
|
return component;
|
|
28
41
|
},
|
|
42
|
+
'DatePicker|Calendar|Picker': function DatePickerCalendarPicker() {
|
|
43
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
44
|
+
// TODO: 1.0.9 版本数据兼容
|
|
45
|
+
if (!component.props.hasOwnProperty('visible')) {
|
|
46
|
+
component.props.visible = false;
|
|
47
|
+
}
|
|
48
|
+
;
|
|
49
|
+
return component;
|
|
50
|
+
},
|
|
29
51
|
DformDate: function DformDate() {
|
|
30
52
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
31
|
-
var _component$
|
|
32
|
-
props = _component$
|
|
53
|
+
var _component$props4 = component.props,
|
|
54
|
+
props = _component$props4 === void 0 ? {} : _component$props4;
|
|
33
55
|
var isCurrent = props.isCurrent,
|
|
34
56
|
defaultValue = props.defaultValue,
|
|
35
57
|
customTime = props.customTime;
|
|
@@ -56,22 +78,24 @@ var h5 = {
|
|
|
56
78
|
},
|
|
57
79
|
'DMultiplePicker|DformDate|DformInput|DformSelect|DformPicker': function DMultiplePickerDformDateDformInputDformSelectDformPicker() {
|
|
58
80
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59
|
-
var _component$
|
|
60
|
-
props = _component$
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
var _component$props5 = component.props,
|
|
82
|
+
props = _component$props5 === void 0 ? {} : _component$props5;
|
|
83
|
+
if (props.hasOwnProperty('type')) {
|
|
84
|
+
delete props.type;
|
|
85
|
+
delete props.theme;
|
|
86
|
+
delete props.fontAddress;
|
|
87
|
+
delete props.isIconFont;
|
|
88
|
+
delete props.iconFileInfo;
|
|
89
|
+
delete props.svgContent;
|
|
90
|
+
delete props.iconFile;
|
|
91
|
+
}
|
|
68
92
|
return component;
|
|
69
93
|
},
|
|
70
94
|
DformFile: function DformFile() {
|
|
71
95
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
72
96
|
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
73
|
-
var _component$
|
|
74
|
-
props = _component$
|
|
97
|
+
var _component$props6 = component.props,
|
|
98
|
+
props = _component$props6 === void 0 ? {} : _component$props6;
|
|
75
99
|
var accept = props.accept,
|
|
76
100
|
acceptExtension = props.acceptExtension;
|
|
77
101
|
if (props.hasOwnProperty('accept')) {
|
|
@@ -86,21 +110,42 @@ var h5 = {
|
|
|
86
110
|
},
|
|
87
111
|
'Image|DformFile|DformImagePicker|Signature': function ImageDformFileDformImagePickerSignature() {
|
|
88
112
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
89
|
-
var _component$
|
|
90
|
-
props = _component$
|
|
113
|
+
var _component$props7 = component.props,
|
|
114
|
+
props = _component$props7 === void 0 ? {} : _component$props7;
|
|
91
115
|
if (props.hasOwnProperty('action')) {
|
|
92
116
|
// 旧数据含有action,实际用到的值和columns当中的api是相同
|
|
93
117
|
props.columns.api = props.action;
|
|
94
118
|
delete props.action;
|
|
95
119
|
}
|
|
96
120
|
return component;
|
|
121
|
+
},
|
|
122
|
+
// 兼容处理下存量的身份证校验规则
|
|
123
|
+
'DformInput|Input': function DformInputInput(component) {
|
|
124
|
+
var _component$props8 = component === null || component === void 0 ? void 0 : component.props,
|
|
125
|
+
regexp = _component$props8.regexp;
|
|
126
|
+
if (Array.isArray(regexp)) {
|
|
127
|
+
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)$/";
|
|
128
|
+
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)$/";
|
|
129
|
+
// 运行态会给正则加上$$符号
|
|
130
|
+
var idCardRegexp = regexp.find(function (reg) {
|
|
131
|
+
return reg.pattern === "$".concat(oldRegStr, "$") || reg.pattern === oldRegStr;
|
|
132
|
+
});
|
|
133
|
+
if (idCardRegexp) {
|
|
134
|
+
if (/^\$.+\$$/.test(idCardRegexp.pattern)) {
|
|
135
|
+
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
136
|
+
} else {
|
|
137
|
+
idCardRegexp.pattern = newRegStr;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return component;
|
|
97
142
|
}
|
|
98
143
|
};
|
|
99
144
|
var pc = {
|
|
100
145
|
'DatePicker|TimePicker': function DatePickerTimePicker() {
|
|
101
146
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
102
|
-
var _component$
|
|
103
|
-
props = _component$
|
|
147
|
+
var _component$props9 = component.props,
|
|
148
|
+
props = _component$props9 === void 0 ? {} : _component$props9;
|
|
104
149
|
var isCurrent = props.isCurrent,
|
|
105
150
|
defaultValue = props.defaultValue,
|
|
106
151
|
customTime = props.customTime;
|
|
@@ -127,8 +172,8 @@ var pc = {
|
|
|
127
172
|
},
|
|
128
173
|
Button: function Button() {
|
|
129
174
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
130
|
-
var _component$
|
|
131
|
-
props = _component$
|
|
175
|
+
var _component$props10 = component.props,
|
|
176
|
+
props = _component$props10 === void 0 ? {} : _component$props10;
|
|
132
177
|
// const { popoverSetting, showPopover } = props;
|
|
133
178
|
if (props.iconType && !props.icon) {
|
|
134
179
|
var theme = props.theme,
|
|
@@ -153,19 +198,34 @@ var pc = {
|
|
|
153
198
|
delete props.iconFileInfo;
|
|
154
199
|
delete props.svgContent;
|
|
155
200
|
delete props.iconFile;
|
|
201
|
+
// 兼容存量数据不存在 hasIcon(是否有图标开关标识)
|
|
202
|
+
if ((props === null || props === void 0 ? void 0 : props.icon) && JSON.stringify(props.icon) !== '{}') {
|
|
203
|
+
props.hasIcon = true;
|
|
204
|
+
} else {
|
|
205
|
+
props.hasIcon = false;
|
|
206
|
+
}
|
|
156
207
|
return component;
|
|
157
208
|
},
|
|
158
209
|
'Dropdown|Menu': function DropdownMenu() {
|
|
159
210
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
160
|
-
var _component$
|
|
161
|
-
props = _component$
|
|
211
|
+
var _component$props11 = component.props,
|
|
212
|
+
props = _component$props11 === void 0 ? {} : _component$props11;
|
|
162
213
|
delete props.iconInfo;
|
|
163
214
|
return component;
|
|
164
215
|
},
|
|
165
216
|
'Input|Card|Collapse': function InputCardCollapse() {
|
|
166
217
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
167
|
-
var _component$
|
|
168
|
-
props = _component$
|
|
218
|
+
var _component$props12 = component.props,
|
|
219
|
+
props = _component$props12 === void 0 ? {} : _component$props12;
|
|
220
|
+
if (!props.icon) {
|
|
221
|
+
props.icon = {
|
|
222
|
+
type: props.type,
|
|
223
|
+
theme: props.theme || "outlined",
|
|
224
|
+
fontAddress: "",
|
|
225
|
+
isIconFont: false,
|
|
226
|
+
iconFileInfo: {}
|
|
227
|
+
};
|
|
228
|
+
}
|
|
169
229
|
delete props.type;
|
|
170
230
|
delete props.theme;
|
|
171
231
|
delete props.fontAddress;
|
|
@@ -173,6 +233,15 @@ var pc = {
|
|
|
173
233
|
delete props.iconFileInfo;
|
|
174
234
|
delete props.svgContent;
|
|
175
235
|
delete props.iconFile;
|
|
236
|
+
if (!props.prefixIcon) {
|
|
237
|
+
props.prefixIcon = {
|
|
238
|
+
type: props.prefixIconType,
|
|
239
|
+
theme: props.prefixIconTheme || "outlined",
|
|
240
|
+
fontAddress: "",
|
|
241
|
+
isIconFont: false,
|
|
242
|
+
iconFileInfo: {}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
176
245
|
delete props.prefixIconIconFileInfo;
|
|
177
246
|
delete props.prefixIconIsIconFont;
|
|
178
247
|
delete props.prefixIconType;
|
|
@@ -183,8 +252,17 @@ var pc = {
|
|
|
183
252
|
},
|
|
184
253
|
'StdUpload|Icon': function StdUploadIcon() {
|
|
185
254
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
186
|
-
var _component$
|
|
187
|
-
props = _component$
|
|
255
|
+
var _component$props13 = component.props,
|
|
256
|
+
props = _component$props13 === void 0 ? {} : _component$props13;
|
|
257
|
+
if (!props.icon) {
|
|
258
|
+
props.icon = {
|
|
259
|
+
type: props.type,
|
|
260
|
+
theme: props.theme || "outlined",
|
|
261
|
+
fontAddress: "",
|
|
262
|
+
isIconFont: false,
|
|
263
|
+
iconFileInfo: {}
|
|
264
|
+
};
|
|
265
|
+
}
|
|
188
266
|
delete props.type;
|
|
189
267
|
delete props.theme;
|
|
190
268
|
delete props.fontAddress;
|
|
@@ -196,8 +274,8 @@ var pc = {
|
|
|
196
274
|
},
|
|
197
275
|
Table: function Table() {
|
|
198
276
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
199
|
-
var _component$
|
|
200
|
-
props = _component$
|
|
277
|
+
var _component$props14 = component.props,
|
|
278
|
+
props = _component$props14 === void 0 ? {} : _component$props14;
|
|
201
279
|
if (typeof props.showCustom === 'boolean') {
|
|
202
280
|
// 旧数据
|
|
203
281
|
var iconPosition = props.iconPosition,
|
|
@@ -229,11 +307,31 @@ var pc = {
|
|
|
229
307
|
delete props.customStyle;
|
|
230
308
|
delete props.iconFile;
|
|
231
309
|
}
|
|
310
|
+
// 预处理内容列配置
|
|
311
|
+
var columns = props === null || props === void 0 ? void 0 : props.columns;
|
|
312
|
+
if (Array.isArray(columns)) {
|
|
313
|
+
props.columns = columns.map(function (colCfg) {
|
|
314
|
+
/**
|
|
315
|
+
* 1、兼容存量没有 editContent 情况:默认改为 -> 提示方式为默认提示 -> 提示内容为初始数据
|
|
316
|
+
* 2、false 假值表示:提示方式为无
|
|
317
|
+
*/
|
|
318
|
+
if (!(colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) && typeof (colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) !== 'boolean') {
|
|
319
|
+
colCfg.editContent = {
|
|
320
|
+
edittype: 'title',
|
|
321
|
+
title: {
|
|
322
|
+
"code": "$function main(text, row, index) { return text;}$",
|
|
323
|
+
"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;", "}"]
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
return colCfg;
|
|
328
|
+
});
|
|
329
|
+
}
|
|
232
330
|
return component;
|
|
233
331
|
},
|
|
234
332
|
Upload: function Upload(component) {
|
|
235
|
-
var _component$
|
|
236
|
-
props = _component$
|
|
333
|
+
var _component$props15 = component.props,
|
|
334
|
+
props = _component$props15 === void 0 ? {} : _component$props15;
|
|
237
335
|
if (props.hasOwnProperty('action')) {
|
|
238
336
|
// 旧数据含有action
|
|
239
337
|
props.columns.api = props.action;
|
|
@@ -257,12 +355,56 @@ var pc = {
|
|
|
257
355
|
}
|
|
258
356
|
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
259
357
|
if (props.hasOwnProperty('accept')) {
|
|
260
|
-
props.uploadAccepType
|
|
261
|
-
|
|
358
|
+
props.uploadAccepType = Object.assign({}, props.uploadAccepType, {
|
|
359
|
+
accept: accept
|
|
360
|
+
});
|
|
361
|
+
delete props.accept;
|
|
262
362
|
}
|
|
263
363
|
if (props.hasOwnProperty('acceptExtension')) {
|
|
264
|
-
props.uploadAccepType
|
|
265
|
-
|
|
364
|
+
props.uploadAccepType = Object.assign({}, props.uploadAccepType, {
|
|
365
|
+
acceptExtension: acceptExtension
|
|
366
|
+
});
|
|
367
|
+
delete props.acceptExtension;
|
|
368
|
+
}
|
|
369
|
+
return component;
|
|
370
|
+
},
|
|
371
|
+
TreeSelect: function TreeSelect(component) {
|
|
372
|
+
var props = component.props;
|
|
373
|
+
var multiple = props.multiple,
|
|
374
|
+
treeNodeFilterProp = props.treeNodeFilterProp,
|
|
375
|
+
treeCheckable = props.treeCheckable,
|
|
376
|
+
_props$filter = props.filter,
|
|
377
|
+
filter = _props$filter === void 0 ? 'local' : _props$filter;
|
|
378
|
+
if (props.hasOwnProperty('multiple')) {
|
|
379
|
+
// 废除multiple,多选统一设置为treeCheckable
|
|
380
|
+
component.props.treeCheckable = multiple || treeCheckable;
|
|
381
|
+
delete props.multiple;
|
|
382
|
+
}
|
|
383
|
+
if (props.hasOwnProperty('treeNodeFilterProp')) {
|
|
384
|
+
// 以前设置了过滤搜索值的,统一设置为本地过滤
|
|
385
|
+
component.props.filter = treeNodeFilterProp ? 'local' : filter;
|
|
386
|
+
delete props.treeNodeFilterProp;
|
|
387
|
+
}
|
|
388
|
+
return component;
|
|
389
|
+
},
|
|
390
|
+
Input: function Input(component) {
|
|
391
|
+
// 兼容处理下存量的身份证校验规则
|
|
392
|
+
var _component$props16 = component === null || component === void 0 ? void 0 : component.props,
|
|
393
|
+
regexp = _component$props16.regexp;
|
|
394
|
+
if (Array.isArray(regexp)) {
|
|
395
|
+
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)$/";
|
|
396
|
+
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)$/";
|
|
397
|
+
// 运行态会给正则加上$$符号
|
|
398
|
+
var idCardRegexp = regexp.find(function (reg) {
|
|
399
|
+
return reg.pattern === "$".concat(oldRegStr, "$") || reg.pattern === oldRegStr;
|
|
400
|
+
});
|
|
401
|
+
if (idCardRegexp) {
|
|
402
|
+
if (/^\$.+\$$/.test(idCardRegexp.pattern)) {
|
|
403
|
+
idCardRegexp.pattern = "$".concat(newRegStr, "$");
|
|
404
|
+
} else {
|
|
405
|
+
idCardRegexp.pattern = newRegStr;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
266
408
|
}
|
|
267
409
|
return component;
|
|
268
410
|
}
|
|
@@ -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>;
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.preprocessDSL = void 0;
|
|
7
7
|
var _common = _interopRequireDefault(require("./preprocess/common"));
|
|
8
|
-
var _editor = _interopRequireDefault(require("./preprocess/editor"));
|
|
9
|
-
var _engine = _interopRequireDefault(require("./preprocess/engine"));
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
9
|
/**
|
|
12
10
|
* 支持属性key通过 "compName|compName"模式
|
|
@@ -25,8 +23,8 @@ var collectionMethods = function collectionMethods(compName, obj) {
|
|
|
25
23
|
return funcs;
|
|
26
24
|
};
|
|
27
25
|
/**
|
|
28
|
-
* 本方法只处理运行态和配置态公共属性.
|
|
29
|
-
*
|
|
26
|
+
* 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
|
|
27
|
+
* 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
|
|
30
28
|
* @param component
|
|
31
29
|
* @param context
|
|
32
30
|
* @returns
|
|
@@ -45,44 +43,4 @@ var preprocessDSL = function preprocessDSL(component, context) {
|
|
|
45
43
|
});
|
|
46
44
|
return targetComponents;
|
|
47
45
|
};
|
|
48
|
-
|
|
49
|
-
* 预处理DSL数据, 本方法仅在编辑器端使用。 处理后数据的权重高于preprocessDSL。
|
|
50
|
-
* @param component 组件JSON数据
|
|
51
|
-
* @param context 上下文
|
|
52
|
-
*/
|
|
53
|
-
exports.preprocessDSL = preprocessDSL;
|
|
54
|
-
var preprocessEditorDSL = function preprocessEditorDSL(component, context) {
|
|
55
|
-
var targetComponents = component;
|
|
56
|
-
var _ref2 = component || {},
|
|
57
|
-
compName = _ref2.compName;
|
|
58
|
-
var _context$isMobile2 = context.isMobile,
|
|
59
|
-
isMobile = _context$isMobile2 === void 0 ? false : _context$isMobile2;
|
|
60
|
-
var platform = isMobile ? 'h5' : 'pc';
|
|
61
|
-
var methods = collectionMethods(compName, _editor.default === null || _editor.default === void 0 ? void 0 : _editor.default[platform]);
|
|
62
|
-
methods.forEach(function (fn) {
|
|
63
|
-
var _fn2;
|
|
64
|
-
targetComponents = (_fn2 = fn(targetComponents)) !== null && _fn2 !== void 0 ? _fn2 : targetComponents;
|
|
65
|
-
});
|
|
66
|
-
return targetComponents;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* 预处理DSL数据,本方法仅在运行态端使用。 处理后数据的权重高于preprocessDSL。
|
|
70
|
-
* @param component 组件JSON数据
|
|
71
|
-
* @param context 上下文
|
|
72
|
-
*/
|
|
73
|
-
exports.preprocessEditorDSL = preprocessEditorDSL;
|
|
74
|
-
var preprocessEngineDSL = function preprocessEngineDSL(component, context) {
|
|
75
|
-
var targetComponents = component;
|
|
76
|
-
var _ref3 = component || {},
|
|
77
|
-
compName = _ref3.compName;
|
|
78
|
-
var _context$isMobile3 = context.isMobile,
|
|
79
|
-
isMobile = _context$isMobile3 === void 0 ? false : _context$isMobile3;
|
|
80
|
-
var platform = isMobile ? 'h5' : 'pc';
|
|
81
|
-
var methods = collectionMethods(compName, _engine.default === null || _engine.default === void 0 ? void 0 : _engine.default[platform]);
|
|
82
|
-
methods.forEach(function (fn) {
|
|
83
|
-
var _fn3;
|
|
84
|
-
targetComponents = (_fn3 = fn(targetComponents)) !== null && _fn3 !== void 0 ? _fn3 : targetComponents;
|
|
85
|
-
});
|
|
86
|
-
return targetComponents;
|
|
87
|
-
};
|
|
88
|
-
exports.preprocessEngineDSL = preprocessEngineDSL;
|
|
46
|
+
exports.preprocessDSL = preprocessDSL;
|
|
@@ -55,7 +55,8 @@ var Drawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
55
55
|
_props$errorInfoProps = props.errorInfoProps,
|
|
56
56
|
errorInfoProps = _props$errorInfoProps === void 0 ? {
|
|
57
57
|
tabs: []
|
|
58
|
-
} : _props$errorInfoProps
|
|
58
|
+
} : _props$errorInfoProps,
|
|
59
|
+
subTitle = props.subTitle;
|
|
59
60
|
var _useState = (0, _react.useState)([]),
|
|
60
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
61
62
|
extraConts = _useState2[0],
|
|
@@ -200,7 +201,10 @@ var Drawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
200
201
|
tabsContent = errorInfoProps.tabsContent,
|
|
201
202
|
tabsFooter = errorInfoProps.tabsFooter,
|
|
202
203
|
onTabsChange = errorInfoProps.onTabsChange;
|
|
203
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isDomEle(
|
|
204
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isDomEle(subTitle) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
205
|
+
className: "lx-drawer-sub-title",
|
|
206
|
+
title: subTitle
|
|
207
|
+
}, subTitle) : null, isDomEle(content) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
204
208
|
className: "lx-drawer-code-desc"
|
|
205
209
|
}, content) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
206
210
|
className: (0, _classnames.default)('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 {
|