ronds-metadata 1.3.36 → 1.3.38
Sign up to get free protection for your applications and to get access to all the features.
- package/es/comps/DynamicPorts/comps/NodeElementForm.js +5 -4
- package/es/comps/DynamicPorts/comps/NodeElementNormal.js +5 -4
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +4 -3
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/NumberRange.js +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +4 -3
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +4 -3
- package/es/comps/FormGenerator/comps/Canvas/core/index.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/index.js +7 -6
- package/es/comps/FormGenerator/comps/Settings/index.js +3 -2
- package/es/comps/FormGenerator/comps/Sidebar/Elements.js +3 -2
- package/es/comps/FormGenerator/comps/Sidebar/index.js +3 -2
- package/es/comps/FormGenerator/settings/ruleConfig.js +47 -46
- package/es/comps/MetadataForm/DataCell/Array.js +3 -3
- package/es/comps/MetadataForm/DataCell/Input.js +18 -18
- package/es/comps/MetadataForm/DataCell/Number.js +16 -16
- package/es/comps/MetadataForm/DataCell/Ref.js +12 -12
- package/es/comps/MetadataForm/DataCell/Select.js +19 -19
- package/es/comps/MetadataForm/DataCell/Switch.js +12 -12
- package/es/comps/MetadataForm/DataCell/layout/TableArray.js +3 -2
- package/es/comps/locales/en-US.d.ts +1 -0
- package/es/comps/locales/en-US.js +3 -2
- package/es/comps/locales/zh-CN.d.ts +1 -0
- package/es/comps/locales/zh-CN.js +3 -2
- package/es/config.d.ts +4 -0
- package/es/config.js +17 -2
- package/package.json +3 -1
@@ -2,9 +2,10 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
/*
|
3
3
|
* @Author: wangxian
|
4
4
|
* @Date: 2023-02-08 10:36:25
|
5
|
-
* @LastEditTime:
|
5
|
+
* @LastEditTime: 2024-04-17 10:42:02
|
6
6
|
*/
|
7
7
|
import { DEFAULT_DATE_FORMAT } from '../../../comps/MetadataForm/DataCell/Input';
|
8
|
+
import { tr } from '../../../framework/locale';
|
8
9
|
export var Rule = {
|
9
10
|
common: {
|
10
11
|
id: {
|
@@ -16,7 +17,7 @@ export var Rule = {
|
|
16
17
|
refId: 'com.ronds.schema.default.Rule.Form',
|
17
18
|
value: {
|
18
19
|
label: 'ID',
|
19
|
-
tooltip: '字段名称(仅支持英文)'
|
20
|
+
tooltip: tr('字段名称(仅支持英文)')
|
20
21
|
}
|
21
22
|
}]
|
22
23
|
},
|
@@ -28,7 +29,7 @@ export var Rule = {
|
|
28
29
|
type: 'ref',
|
29
30
|
refId: 'com.ronds.schema.default.Rule.Form',
|
30
31
|
value: {
|
31
|
-
label: '标题'
|
32
|
+
label: tr('标题')
|
32
33
|
}
|
33
34
|
}]
|
34
35
|
},
|
@@ -40,7 +41,7 @@ export var Rule = {
|
|
40
41
|
type: 'ref',
|
41
42
|
refId: 'com.ronds.schema.default.Rule.Form',
|
42
43
|
value: {
|
43
|
-
label: '标题颜色',
|
44
|
+
label: tr('标题颜色'),
|
44
45
|
type: 'colorPicker'
|
45
46
|
}
|
46
47
|
}]
|
@@ -57,9 +58,9 @@ export var Rule = {
|
|
57
58
|
depend: {}
|
58
59
|
},
|
59
60
|
common: {
|
60
|
-
label: '组件布局',
|
61
|
-
tooltip: '默认按照整体布局配置排布',
|
62
|
-
help: '这里填写表单整体布局的倍数,最大一行'
|
61
|
+
label: tr('组件布局'),
|
62
|
+
tooltip: tr('默认按照整体布局配置排布'),
|
63
|
+
help: tr('这里填写表单整体布局的倍数,最大一行')
|
63
64
|
}
|
64
65
|
}
|
65
66
|
}]
|
@@ -72,7 +73,7 @@ export var Rule = {
|
|
72
73
|
type: 'ref',
|
73
74
|
refId: 'com.ronds.schema.default.Rule.Form',
|
74
75
|
value: {
|
75
|
-
label: '默认值'
|
76
|
+
label: tr('默认值')
|
76
77
|
}
|
77
78
|
}]
|
78
79
|
},
|
@@ -84,7 +85,7 @@ export var Rule = {
|
|
84
85
|
type: 'ref',
|
85
86
|
refId: 'com.ronds.schema.default.Rule.Form',
|
86
87
|
value: {
|
87
|
-
label: '帮助说明'
|
88
|
+
label: tr('帮助说明')
|
88
89
|
}
|
89
90
|
}]
|
90
91
|
},
|
@@ -96,7 +97,7 @@ export var Rule = {
|
|
96
97
|
type: 'ref',
|
97
98
|
refId: 'com.ronds.schema.default.Rule.Form',
|
98
99
|
value: {
|
99
|
-
label: '提示说明'
|
100
|
+
label: tr('提示说明')
|
100
101
|
}
|
101
102
|
}]
|
102
103
|
},
|
@@ -108,7 +109,7 @@ export var Rule = {
|
|
108
109
|
type: 'ref',
|
109
110
|
refId: 'com.ronds.schema.default.Rule.Form',
|
110
111
|
value: {
|
111
|
-
label: '默认文本'
|
112
|
+
label: tr('默认文本')
|
112
113
|
}
|
113
114
|
}]
|
114
115
|
},
|
@@ -120,8 +121,8 @@ export var Rule = {
|
|
120
121
|
type: 'ref',
|
121
122
|
refId: 'com.ronds.schema.default.Rule.Form',
|
122
123
|
value: {
|
123
|
-
label: '是否换行',
|
124
|
-
help: '后面字段另起一行'
|
124
|
+
label: tr('是否换行'),
|
125
|
+
help: tr('后面字段另起一行')
|
125
126
|
}
|
126
127
|
}]
|
127
128
|
},
|
@@ -133,7 +134,7 @@ export var Rule = {
|
|
133
134
|
type: 'ref',
|
134
135
|
refId: 'com.ronds.schema.default.Rule.Form',
|
135
136
|
value: {
|
136
|
-
label: '是否必填'
|
137
|
+
label: tr('是否必填')
|
137
138
|
}
|
138
139
|
}]
|
139
140
|
},
|
@@ -145,7 +146,7 @@ export var Rule = {
|
|
145
146
|
type: 'ref',
|
146
147
|
refId: 'com.ronds.schema.default.Rule.Form',
|
147
148
|
value: {
|
148
|
-
label: '是否禁用'
|
149
|
+
label: tr('是否禁用')
|
149
150
|
}
|
150
151
|
}]
|
151
152
|
},
|
@@ -158,7 +159,7 @@ export var Rule = {
|
|
158
159
|
refId: 'com.ronds.schema.default.Rule.Form',
|
159
160
|
value: {
|
160
161
|
common: {
|
161
|
-
label: '是否隐藏'
|
162
|
+
label: tr('是否隐藏')
|
162
163
|
},
|
163
164
|
'common-en-US': {}
|
164
165
|
}
|
@@ -176,7 +177,7 @@ export var Rule = {
|
|
176
177
|
value: {
|
177
178
|
text: {},
|
178
179
|
common: {
|
179
|
-
label: '隐藏'
|
180
|
+
label: tr('隐藏')
|
180
181
|
},
|
181
182
|
'common-en-US': {}
|
182
183
|
}
|
@@ -192,7 +193,7 @@ export var Rule = {
|
|
192
193
|
value: {
|
193
194
|
text: {},
|
194
195
|
common: {
|
195
|
-
label: '显示',
|
196
|
+
label: tr('显示'),
|
196
197
|
depend: {}
|
197
198
|
},
|
198
199
|
'common-en-US': {}
|
@@ -209,7 +210,7 @@ export var Rule = {
|
|
209
210
|
value: {
|
210
211
|
text: {},
|
211
212
|
common: {
|
212
|
-
label: '非必填',
|
213
|
+
label: tr('非必填'),
|
213
214
|
depend: {}
|
214
215
|
},
|
215
216
|
'common-en-US': {}
|
@@ -226,7 +227,7 @@ export var Rule = {
|
|
226
227
|
value: {
|
227
228
|
text: {},
|
228
229
|
common: {
|
229
|
-
label: '只读',
|
230
|
+
label: tr('只读'),
|
230
231
|
depend: {}
|
231
232
|
},
|
232
233
|
'common-en-US': {}
|
@@ -257,24 +258,24 @@ export var Rule = {
|
|
257
258
|
enum: {
|
258
259
|
value: [{
|
259
260
|
key: 'textarea',
|
260
|
-
value: '文本框'
|
261
|
+
value: tr('文本框')
|
261
262
|
}, {
|
262
263
|
key: 'password',
|
263
|
-
value: '密码框'
|
264
|
+
value: tr('密码框')
|
264
265
|
}, {
|
265
266
|
key: 'datePicker',
|
266
|
-
value: '日期选择框'
|
267
|
+
value: tr('日期选择框')
|
267
268
|
}, {
|
268
269
|
key: 'colorPicker',
|
269
|
-
value: '颜色选择框'
|
270
|
+
value: tr('颜色选择框')
|
270
271
|
}, {
|
271
272
|
key: 'upload',
|
272
|
-
value: '上传'
|
273
|
+
value: tr('上传')
|
273
274
|
}]
|
274
275
|
},
|
275
276
|
text: {},
|
276
277
|
common: {
|
277
|
-
label: '类型'
|
278
|
+
label: tr('类型')
|
278
279
|
}
|
279
280
|
}
|
280
281
|
}]
|
@@ -289,7 +290,7 @@ export var Rule = {
|
|
289
290
|
value: {
|
290
291
|
text: {},
|
291
292
|
common: {
|
292
|
-
label: '格式化',
|
293
|
+
label: tr('格式化'),
|
293
294
|
help: "".concat(DEFAULT_DATE_FORMAT)
|
294
295
|
},
|
295
296
|
'common-en-US': {}
|
@@ -306,7 +307,7 @@ export var Rule = {
|
|
306
307
|
value: {
|
307
308
|
text: {},
|
308
309
|
common: {
|
309
|
-
label: '默认高度'
|
310
|
+
label: tr('默认高度')
|
310
311
|
},
|
311
312
|
'common-en-US': {}
|
312
313
|
}
|
@@ -324,7 +325,7 @@ export var Rule = {
|
|
324
325
|
value: {
|
325
326
|
text: {},
|
326
327
|
common: {
|
327
|
-
label: '正则表达式'
|
328
|
+
label: tr('正则表达式')
|
328
329
|
},
|
329
330
|
'common-en-US': {}
|
330
331
|
}
|
@@ -340,7 +341,7 @@ export var Rule = {
|
|
340
341
|
value: {
|
341
342
|
text: {},
|
342
343
|
common: {
|
343
|
-
label: '提示信息'
|
344
|
+
label: tr('提示信息')
|
344
345
|
},
|
345
346
|
'common-en-US': {}
|
346
347
|
}
|
@@ -365,7 +366,7 @@ var Ref2Rule = {
|
|
365
366
|
refId: 'com.ronds.schema.default.Rule.Form.Common',
|
366
367
|
value: {
|
367
368
|
common: {
|
368
|
-
label: '枚举值'
|
369
|
+
label: tr('枚举值')
|
369
370
|
},
|
370
371
|
'common-en-US': {},
|
371
372
|
array: {
|
@@ -398,8 +399,8 @@ var Ref2Rule = {
|
|
398
399
|
refId: 'com.ronds.schema.default.Rule.Form',
|
399
400
|
value: {
|
400
401
|
common: {
|
401
|
-
label: '动态枚举值',
|
402
|
-
tooltip: '通过接口调用获取枚举值'
|
402
|
+
label: tr('动态枚举值'),
|
403
|
+
tooltip: tr('通过接口调用获取枚举值')
|
403
404
|
},
|
404
405
|
'common-en-US': {}
|
405
406
|
}
|
@@ -418,7 +419,7 @@ var Ref2Rule = {
|
|
418
419
|
value: {
|
419
420
|
text: {},
|
420
421
|
common: {
|
421
|
-
label: '请求URL'
|
422
|
+
label: tr('请求URL')
|
422
423
|
},
|
423
424
|
'common-en-US': {}
|
424
425
|
}
|
@@ -438,7 +439,7 @@ var Ref2Rule = {
|
|
438
439
|
value: {
|
439
440
|
text: {},
|
440
441
|
common: {
|
441
|
-
label: '请求方法',
|
442
|
+
label: tr('请求方法'),
|
442
443
|
defaultValue: 'get'
|
443
444
|
},
|
444
445
|
'common-en-US': {}
|
@@ -456,8 +457,8 @@ var Ref2Rule = {
|
|
456
457
|
type: 'textarea'
|
457
458
|
},
|
458
459
|
common: {
|
459
|
-
label: 'Body参数',
|
460
|
-
help: '支持Json字符串,系统会自动序列化',
|
460
|
+
label: tr('Body参数'),
|
461
|
+
help: tr('支持Json字符串,系统会自动序列化'),
|
461
462
|
depend: {
|
462
463
|
show: "method=='post'"
|
463
464
|
}
|
@@ -475,7 +476,7 @@ var Ref2Rule = {
|
|
475
476
|
value: {
|
476
477
|
text: {},
|
477
478
|
common: {
|
478
|
-
label: 'Key的替换属性'
|
479
|
+
label: tr('Key的替换属性')
|
479
480
|
},
|
480
481
|
'common-en-US': {}
|
481
482
|
}
|
@@ -490,7 +491,7 @@ var Ref2Rule = {
|
|
490
491
|
value: {
|
491
492
|
text: {},
|
492
493
|
common: {
|
493
|
-
label: 'Vaule的替换属性'
|
494
|
+
label: tr('Vaule的替换属性')
|
494
495
|
},
|
495
496
|
'common-en-US': {}
|
496
497
|
}
|
@@ -505,8 +506,8 @@ var Ref2Rule = {
|
|
505
506
|
value: {
|
506
507
|
text: {},
|
507
508
|
common: {
|
508
|
-
label: '监听',
|
509
|
-
help: '监听多个属性,用英文逗号隔开',
|
509
|
+
label: tr('监听'),
|
510
|
+
help: tr('监听多个属性,用英文逗号隔开'),
|
510
511
|
placeholder: 'id,name'
|
511
512
|
},
|
512
513
|
'common-en-US': {}
|
@@ -530,7 +531,7 @@ export var RefRule = {
|
|
530
531
|
refId: 'com.ronds.schema.default.Rule.Form',
|
531
532
|
value: {
|
532
533
|
common: {
|
533
|
-
label: '列表联动'
|
534
|
+
label: tr('列表联动')
|
534
535
|
},
|
535
536
|
'common-en-US': {}
|
536
537
|
}
|
@@ -557,7 +558,7 @@ export var RefRule = {
|
|
557
558
|
value: {
|
558
559
|
array: {},
|
559
560
|
common: {
|
560
|
-
label: '校验规则'
|
561
|
+
label: tr('校验规则')
|
561
562
|
},
|
562
563
|
'common-en-US': {}
|
563
564
|
}
|
@@ -581,7 +582,7 @@ export var RefRule = {
|
|
581
582
|
refId: 'com.ronds.schema.default.Rule.Form',
|
582
583
|
value: {
|
583
584
|
common: {
|
584
|
-
label: '高级设置'
|
585
|
+
label: tr('高级设置')
|
585
586
|
},
|
586
587
|
'common-en-US': {}
|
587
588
|
}
|
@@ -604,7 +605,7 @@ export var RefRule = {
|
|
604
605
|
refId: 'com.ronds.schema.default.Rule.Form',
|
605
606
|
value: {
|
606
607
|
common: {
|
607
|
-
label: '高级设置'
|
608
|
+
label: tr('高级设置')
|
608
609
|
},
|
609
610
|
'common-en-US': {}
|
610
611
|
}
|
@@ -627,7 +628,7 @@ export var RefRule = {
|
|
627
628
|
refId: 'com.ronds.schema.default.Rule.Form',
|
628
629
|
value: {
|
629
630
|
common: {
|
630
|
-
label: '高级设置'
|
631
|
+
label: tr('高级设置')
|
631
632
|
},
|
632
633
|
ref: {
|
633
634
|
titleHidden: true
|
@@ -11,7 +11,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
11
|
/*
|
12
12
|
* @Author: wangxian
|
13
13
|
* @Date: 2021-09-18 14:15:04
|
14
|
-
* @LastEditTime: 2024-
|
14
|
+
* @LastEditTime: 2024-04-17 09:14:59
|
15
15
|
*/
|
16
16
|
import React from 'react';
|
17
17
|
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
|
@@ -66,7 +66,7 @@ function Index(props) {
|
|
66
66
|
className: "ant-form-item-label ant-form-item-label-wrap mt-1 "
|
67
67
|
}, /*#__PURE__*/React.createElement("label", {
|
68
68
|
className: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require) && 'ant-form-item-required')
|
69
|
-
}, extraInfo.label || fieldRule && ((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && ((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : _fieldRule$2$value.common.label) || id)), formContext.isShowTypeInfo && /*#__PURE__*/React.createElement("div", {
|
69
|
+
}, tr(extraInfo.label) || fieldRule && tr((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && tr((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : _fieldRule$2$value.common.label) || id)), formContext.isShowTypeInfo && /*#__PURE__*/React.createElement("div", {
|
70
70
|
style: {
|
71
71
|
padding: '0 6px',
|
72
72
|
position: 'absolute',
|
@@ -74,7 +74,7 @@ function Index(props) {
|
|
74
74
|
top: '19px',
|
75
75
|
background: '#fff'
|
76
76
|
}
|
77
|
-
}, help || (items === null || items === void 0 ? void 0 : items.type)))), /*#__PURE__*/React.createElement(_Col, {
|
77
|
+
}, tr(help) || (items === null || items === void 0 ? void 0 : items.type)))), /*#__PURE__*/React.createElement(_Col, {
|
78
78
|
flex: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? "0 0 ".concat((24 - labelSpan) * 100 / 24, "%") : 1,
|
79
79
|
style: {
|
80
80
|
width: "".concat((24 - labelSpan) * 100 / 24, "%")
|
@@ -16,7 +16,7 @@ import _Input from "antd/es/input";
|
|
16
16
|
/*
|
17
17
|
* @Author: wangxian
|
18
18
|
* @Date: 2021-09-18 14:15:04
|
19
|
-
* @LastEditTime: 2024-
|
19
|
+
* @LastEditTime: 2024-04-16 16:20:05
|
20
20
|
*/
|
21
21
|
import React from 'react';
|
22
22
|
import { UploadOutlined } from '@ant-design/icons';
|
@@ -95,13 +95,13 @@ function Index(props) {
|
|
95
95
|
maxLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxLength,
|
96
96
|
rows: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.textareaRows) || 4,
|
97
97
|
disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
|
98
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
98
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
|
99
99
|
});
|
100
100
|
case 'colorPicker':
|
101
101
|
return /*#__PURE__*/React.createElement(_Input, {
|
102
102
|
type: "color",
|
103
103
|
disabled: (_extraInfo$disabled3 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled3 !== void 0 ? _extraInfo$disabled3 : disabled,
|
104
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
104
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
|
105
105
|
});
|
106
106
|
case 'datePicker':
|
107
107
|
return (
|
@@ -111,7 +111,7 @@ function Index(props) {
|
|
111
111
|
showTime: true,
|
112
112
|
format: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.format) || DEFAULT_DATE_FORMAT,
|
113
113
|
disabled: (_extraInfo$disabled4 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled4 !== void 0 ? _extraInfo$disabled4 : disabled,
|
114
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
114
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
|
115
115
|
})
|
116
116
|
);
|
117
117
|
case 'upload':
|
@@ -125,7 +125,7 @@ function Index(props) {
|
|
125
125
|
}, /*#__PURE__*/React.createElement(_Button, {
|
126
126
|
disabled: (_extraInfo$disabled5 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled5 !== void 0 ? _extraInfo$disabled5 : disabled,
|
127
127
|
icon: /*#__PURE__*/React.createElement(UploadOutlined, null)
|
128
|
-
},
|
128
|
+
}, tr('上传')));
|
129
129
|
case 'numberRange':
|
130
130
|
return /*#__PURE__*/React.createElement(NumberRange, _extends({}, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.numberRange, {
|
131
131
|
disabled: (_extraInfo$disabled6 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled6 !== void 0 ? _extraInfo$disabled6 : disabled
|
@@ -145,8 +145,8 @@ function Index(props) {
|
|
145
145
|
showCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.showCount,
|
146
146
|
maxLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxLength,
|
147
147
|
disabled: (_extraInfo$disabled7 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled7 !== void 0 ? _extraInfo$disabled7 : disabled,
|
148
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder,
|
149
|
-
title: valueTitle,
|
148
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
|
149
|
+
title: tr(valueTitle),
|
150
150
|
allowClear: true
|
151
151
|
});
|
152
152
|
}
|
@@ -164,7 +164,7 @@ function Index(props) {
|
|
164
164
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
165
165
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
166
166
|
} : {}
|
167
|
-
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
167
|
+
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
168
168
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
169
169
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
170
170
|
offset: 0
|
@@ -179,10 +179,10 @@ function Index(props) {
|
|
179
179
|
name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter6 = extraInfo.addonAfter) === null || _extraInfo$addonAfter6 === void 0 ? void 0 : _extraInfo$addonAfter6.key) ? [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name), ['value']) : [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
|
180
180
|
rules: [{
|
181
181
|
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
182
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
182
|
+
message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
183
183
|
}].concat(_toConsumableArray(rules)),
|
184
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
185
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
184
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
185
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
186
186
|
}), processInputType((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) || ''));
|
187
187
|
}
|
188
188
|
return !field ?
|
@@ -198,7 +198,7 @@ function Index(props) {
|
|
198
198
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
199
199
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
200
200
|
} : {}
|
201
|
-
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
201
|
+
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
202
202
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
203
203
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
204
204
|
offset: 0
|
@@ -213,10 +213,10 @@ function Index(props) {
|
|
213
213
|
name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter7 = extraInfo.addonAfter) === null || _extraInfo$addonAfter7 === void 0 ? void 0 : _extraInfo$addonAfter7.key) ? [].concat(_toConsumableArray(name), ['value']) : name,
|
214
214
|
rules: [{
|
215
215
|
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
216
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
216
|
+
message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
217
217
|
}].concat(_toConsumableArray(rules)),
|
218
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
219
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
218
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
219
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
220
220
|
}, processInputType((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) || '')) : /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
|
221
221
|
style: {
|
222
222
|
flex: 1,
|
@@ -226,10 +226,10 @@ function Index(props) {
|
|
226
226
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
227
227
|
rules: [{
|
228
228
|
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
229
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
229
|
+
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
230
230
|
}].concat(_toConsumableArray(rules)),
|
231
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
232
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
231
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
232
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
233
233
|
}), processInputType((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) || ''));
|
234
234
|
}
|
235
235
|
export default /*#__PURE__*/React.memo(Index);
|
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
8
|
/*
|
9
9
|
* @Author: wangxian
|
10
10
|
* @Date: 2021-09-18 14:15:04
|
11
|
-
* @LastEditTime: 2024-
|
11
|
+
* @LastEditTime: 2024-04-17 09:22:09
|
12
12
|
*/
|
13
13
|
import React from 'react';
|
14
14
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -37,7 +37,7 @@ function Index(props) {
|
|
37
37
|
var _ = _rules.map(function (it) {
|
38
38
|
return {
|
39
39
|
pattern: new RegExp(eval(it === null || it === void 0 ? void 0 : it.regExp), 'g'),
|
40
|
-
message: it.message
|
40
|
+
message: tr(it.message)
|
41
41
|
};
|
42
42
|
});
|
43
43
|
setRules(_toConsumableArray(_));
|
@@ -55,7 +55,7 @@ function Index(props) {
|
|
55
55
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
56
56
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
57
57
|
} : {}
|
58
|
-
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
58
|
+
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
59
59
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
60
60
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
61
61
|
offset: 0
|
@@ -69,13 +69,13 @@ function Index(props) {
|
|
69
69
|
} : undefined,
|
70
70
|
rules: [{
|
71
71
|
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
72
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
72
|
+
message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
73
73
|
}].concat(_toConsumableArray(rules)),
|
74
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
75
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
74
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
75
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
76
76
|
}), /*#__PURE__*/React.createElement(_InputNumber, {
|
77
77
|
disabled: (_extraInfo$disabled = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : disabled,
|
78
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
78
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
|
79
79
|
}));
|
80
80
|
}
|
81
81
|
return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
|
@@ -88,7 +88,7 @@ function Index(props) {
|
|
88
88
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
89
89
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
90
90
|
} : {}
|
91
|
-
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
91
|
+
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
92
92
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
93
93
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
94
94
|
offset: 0
|
@@ -103,13 +103,13 @@ function Index(props) {
|
|
103
103
|
name: name,
|
104
104
|
rules: [{
|
105
105
|
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
106
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
106
|
+
message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
107
107
|
}].concat(_toConsumableArray(rules)),
|
108
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
109
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
108
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
109
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
110
110
|
}, /*#__PURE__*/React.createElement(_InputNumber, {
|
111
111
|
disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
|
112
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
112
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
|
113
113
|
})) : /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
|
114
114
|
style: {
|
115
115
|
flex: 1,
|
@@ -118,13 +118,13 @@ function Index(props) {
|
|
118
118
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
119
119
|
rules: [{
|
120
120
|
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
121
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
121
|
+
message: "".concat(tr('请输入')).concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
122
122
|
}].concat(_toConsumableArray(rules)),
|
123
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
124
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
123
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
124
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
125
125
|
}), /*#__PURE__*/React.createElement(_InputNumber, {
|
126
126
|
disabled: (_extraInfo$disabled3 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled3 !== void 0 ? _extraInfo$disabled3 : disabled,
|
127
|
-
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
127
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder)
|
128
128
|
}));
|
129
129
|
}
|
130
130
|
export default /*#__PURE__*/React.memo(Index);
|
@@ -194,7 +194,7 @@ function Index(props) {
|
|
194
194
|
}
|
195
195
|
}, /*#__PURE__*/React.createElement("label", {
|
196
196
|
className: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require) && 'ant-form-item-required')
|
197
|
-
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || fieldRule && ((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && ((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : (_fieldRule$2$value$co = _fieldRule$2$value.common) === null || _fieldRule$2$value$co === void 0 ? void 0 : _fieldRule$2$value$co.label) || id)), formContext.isFoldForm && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
|
197
|
+
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || fieldRule && tr((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && tr((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : (_fieldRule$2$value$co = _fieldRule$2$value.common) === null || _fieldRule$2$value$co === void 0 ? void 0 : _fieldRule$2$value$co.label) || id)), formContext.isFoldForm && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
|
198
198
|
type: "link",
|
199
199
|
onClick: function onClick() {
|
200
200
|
setIsFold(!isFold);
|
@@ -233,7 +233,7 @@ function Index(props) {
|
|
233
233
|
}
|
234
234
|
return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
|
235
235
|
key: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.defaultValue,
|
236
|
-
label: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id,
|
236
|
+
label: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id,
|
237
237
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
238
238
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
239
239
|
offset: 0
|
@@ -249,16 +249,16 @@ function Index(props) {
|
|
249
249
|
name: id,
|
250
250
|
rules: [{
|
251
251
|
required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
252
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
252
|
+
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
253
253
|
}],
|
254
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
255
|
-
tooltip: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip) || help
|
254
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
255
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip) || tr(help)
|
256
256
|
}, /*#__PURE__*/React.createElement(_Select, {
|
257
257
|
showSearch: true,
|
258
258
|
options: options || [],
|
259
|
-
placeholder: extraInfo.placeholder,
|
259
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
|
260
260
|
disabled: (_extraInfo$disabled = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : disabled,
|
261
|
-
notFoundContent: '
|
261
|
+
notFoundContent: tr('没有匹配到该实体数据'),
|
262
262
|
filterOption: function filterOption(input, option) {
|
263
263
|
return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
|
264
264
|
},
|
@@ -272,19 +272,19 @@ function Index(props) {
|
|
272
272
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
273
273
|
rules: [{
|
274
274
|
required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
275
|
-
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
275
|
+
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
276
276
|
}],
|
277
|
-
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
278
|
-
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
277
|
+
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
278
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
279
279
|
}), /*#__PURE__*/React.createElement(_Select, {
|
280
280
|
showSearch: true,
|
281
281
|
style: {
|
282
282
|
width: '100%'
|
283
283
|
},
|
284
284
|
options: options || [],
|
285
|
-
placeholder: extraInfo.placeholder,
|
285
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
|
286
286
|
disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
|
287
|
-
notFoundContent: '
|
287
|
+
notFoundContent: tr('没有匹配到该实体数据'),
|
288
288
|
filterOption: function filterOption(input, option) {
|
289
289
|
return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
|
290
290
|
},
|