@arim-aisdc/public-components 2.0.13 → 2.0.14
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.
|
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
|
|
|
17
17
|
value: any;
|
|
18
18
|
field: string;
|
|
19
19
|
label?: string;
|
|
20
|
-
text: string |
|
|
20
|
+
text: string | Element | JSX.Element;
|
|
21
21
|
units?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
labelWidth?: string;
|
|
@@ -50,7 +50,8 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
50
50
|
var _Form$useForm = Form.useForm(),
|
|
51
51
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
52
52
|
form = _Form$useForm2[0];
|
|
53
|
-
var Option = Select.Option
|
|
53
|
+
var Option = Select.Option,
|
|
54
|
+
OptGroup = Select.OptGroup;
|
|
54
55
|
var RangePicker = DatePicker.RangePicker;
|
|
55
56
|
var _useState = useState({}),
|
|
56
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -229,17 +230,37 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
229
230
|
optionFilterProp: item.optionFilterProp || 'value',
|
|
230
231
|
optionLabelProp: item.optionLabelProp || 'children',
|
|
231
232
|
children: item.setting.map(function (el, num) {
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
var _el$options;
|
|
234
|
+
if (el !== null && el !== void 0 && el.options && (el === null || el === void 0 || (_el$options = el.options) === null || _el$options === void 0 ? void 0 : _el$options.length) > 0) {
|
|
235
|
+
return /*#__PURE__*/_jsx(OptGroup, {
|
|
236
|
+
label: el.label,
|
|
237
|
+
children: el.options.map(function (el2) {
|
|
238
|
+
var _item$fieldNames, _item$fieldNames2, _item$fieldNames3, _item$fieldNames4;
|
|
239
|
+
var value = item !== null && item !== void 0 && (_item$fieldNames = item.fieldNames) !== null && _item$fieldNames !== void 0 && _item$fieldNames.value ? el2[item === null || item === void 0 || (_item$fieldNames2 = item.fieldNames) === null || _item$fieldNames2 === void 0 ? void 0 : _item$fieldNames2.value] : el2.value;
|
|
240
|
+
var label = item !== null && item !== void 0 && (_item$fieldNames3 = item.fieldNames) !== null && _item$fieldNames3 !== void 0 && _item$fieldNames3.label ? el2[item === null || item === void 0 || (_item$fieldNames4 = item.fieldNames) === null || _item$fieldNames4 === void 0 ? void 0 : _item$fieldNames4.label] : el2.label;
|
|
241
|
+
return /*#__PURE__*/_jsx(Option, {
|
|
242
|
+
value: value,
|
|
243
|
+
label: label,
|
|
244
|
+
children: el2.color ? /*#__PURE__*/_jsx(Badge, {
|
|
245
|
+
color: el2.color,
|
|
246
|
+
text: label
|
|
247
|
+
}) : label
|
|
248
|
+
}, value);
|
|
249
|
+
})
|
|
250
|
+
}, num);
|
|
251
|
+
} else {
|
|
252
|
+
var _item$fieldNames5, _item$fieldNames6, _item$fieldNames7, _item$fieldNames8;
|
|
253
|
+
var value = item !== null && item !== void 0 && (_item$fieldNames5 = item.fieldNames) !== null && _item$fieldNames5 !== void 0 && _item$fieldNames5.value ? el[item === null || item === void 0 || (_item$fieldNames6 = item.fieldNames) === null || _item$fieldNames6 === void 0 ? void 0 : _item$fieldNames6.value] : el.value;
|
|
254
|
+
var label = item !== null && item !== void 0 && (_item$fieldNames7 = item.fieldNames) !== null && _item$fieldNames7 !== void 0 && _item$fieldNames7.label ? el[item === null || item === void 0 || (_item$fieldNames8 = item.fieldNames) === null || _item$fieldNames8 === void 0 ? void 0 : _item$fieldNames8.label] : el.label;
|
|
255
|
+
return /*#__PURE__*/_jsx(Option, {
|
|
256
|
+
value: value,
|
|
257
|
+
label: label,
|
|
258
|
+
children: el.color ? /*#__PURE__*/_jsx(Badge, {
|
|
259
|
+
color: el.color,
|
|
260
|
+
text: label
|
|
261
|
+
}) : label
|
|
262
|
+
}, num);
|
|
263
|
+
}
|
|
243
264
|
})
|
|
244
265
|
});
|
|
245
266
|
break;
|