@lemon-fe/kits 1.0.0-84 → 1.0.0-85
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/components/Actions/index.js +1 -1
- package/es/components/DataGrid/cell-editors/Row.d.ts +3 -2
- package/es/components/DataGrid/index.d.ts +2 -0
- package/es/components/DataGrid/index.js +105 -40
- package/es/components/DataGrid/typings.d.ts +4 -0
- package/es/components/DataGrid/utils.js +8 -3
- package/es/components/DurationPicker/index.js +3 -4
- package/es/components/Filter/index.js +42 -23
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare class RowEditorData<T> {
|
|
|
7
7
|
constructor(data: T);
|
|
8
8
|
getValue(): T;
|
|
9
9
|
}
|
|
10
|
+
export declare type RowEditorActionType = 'stop' | 'next';
|
|
10
11
|
export interface RowEditorParams<T = any, K = any> {
|
|
11
12
|
suppressEnterEvent?: boolean;
|
|
12
13
|
isCancelAfterEnd?: (newValue: T, data: T) => boolean;
|
|
@@ -15,8 +16,8 @@ export interface RowEditorParams<T = any, K = any> {
|
|
|
15
16
|
select?: () => void;
|
|
16
17
|
focus?: () => void;
|
|
17
18
|
} | null>;
|
|
18
|
-
onChange: (val: Partial<T>, action?:
|
|
19
|
+
onChange: (val: Partial<T>, action?: RowEditorActionType) => void;
|
|
19
20
|
}) => ReactElement | null;
|
|
20
21
|
}
|
|
21
|
-
declare const _default: React.ForwardRefExoticComponent<ICellEditorParams<any, any> & RowEditorParams<any, any> & React.RefAttributes<ICellEditorReactComp>>;
|
|
22
|
+
declare const _default: React.ForwardRefExoticComponent<ICellEditorParams<any, any, any> & RowEditorParams<any, any> & React.RefAttributes<ICellEditorReactComp>>;
|
|
22
23
|
export default _default;
|
|
@@ -69,6 +69,7 @@ export default class DataGrid<TData extends Record<string, any>> extends Compone
|
|
|
69
69
|
private isClientMode;
|
|
70
70
|
private clearReadyQueue;
|
|
71
71
|
private afterReady;
|
|
72
|
+
private isPreserveSelected;
|
|
72
73
|
private updateRowData;
|
|
73
74
|
private getDataFromServer;
|
|
74
75
|
private pagination;
|
|
@@ -97,5 +98,6 @@ export default class DataGrid<TData extends Record<string, any>> extends Compone
|
|
|
97
98
|
private getMemoizedColumnTypes;
|
|
98
99
|
private getMemoizedComponents;
|
|
99
100
|
private getMemoizedDetailCellParams;
|
|
101
|
+
private getRowStyle;
|
|
100
102
|
render(): JSX.Element;
|
|
101
103
|
}
|
|
@@ -348,6 +348,19 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
348
348
|
};
|
|
349
349
|
}));
|
|
350
350
|
|
|
351
|
+
_defineProperty(_assertThisInitialized(_this), "getRowStyle", function (params) {
|
|
352
|
+
var getRowStyle = _this.props.getRowStyle;
|
|
353
|
+
var style = getRowStyle === null || getRowStyle === void 0 ? void 0 : getRowStyle(params);
|
|
354
|
+
|
|
355
|
+
if (params.node.rowPinned === 'bottom') {
|
|
356
|
+
return _objectSpread({
|
|
357
|
+
fontWeight: 'bold'
|
|
358
|
+
}, style);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return style;
|
|
362
|
+
});
|
|
363
|
+
|
|
351
364
|
_this.state = _objectSpread({
|
|
352
365
|
colDefs: _this.getColumDefs(),
|
|
353
366
|
loading: props.loading || false
|
|
@@ -829,6 +842,21 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
829
842
|
this.readyQueue.push(cb);
|
|
830
843
|
}
|
|
831
844
|
}
|
|
845
|
+
}, {
|
|
846
|
+
key: "isPreserveSelected",
|
|
847
|
+
value: function isPreserveSelected() {
|
|
848
|
+
var rowSelection = this.props.rowSelection;
|
|
849
|
+
|
|
850
|
+
if (rowSelection === undefined) {
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
if (rowSelection.preserveSelectedRowKeys === undefined) {
|
|
855
|
+
return !this.isClientMode();
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
return rowSelection.preserveSelectedRowKeys;
|
|
859
|
+
}
|
|
832
860
|
}, {
|
|
833
861
|
key: "updateRowData",
|
|
834
862
|
value: function updateRowData() {
|
|
@@ -840,21 +868,45 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
840
868
|
|
|
841
869
|
_this4.api.setRowData(data);
|
|
842
870
|
|
|
843
|
-
_this4.
|
|
844
|
-
|
|
845
|
-
|
|
871
|
+
if (_this4.isPreserveSelected()) {
|
|
872
|
+
_this4.api.forEachNode(function (node) {
|
|
873
|
+
if (node.id && _this4.selected.has(node.id)) {
|
|
874
|
+
var rowData = _this4.selected.get(node.id);
|
|
846
875
|
|
|
847
|
-
|
|
848
|
-
|
|
876
|
+
if (node.data !== undefined && rowData !== node.data) {
|
|
877
|
+
_this4.selected.set(node.id, node.data);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if (!node.isSelected()) {
|
|
881
|
+
node.setSelected(true, false, true);
|
|
882
|
+
}
|
|
849
883
|
}
|
|
884
|
+
});
|
|
885
|
+
} else {
|
|
886
|
+
var keys = new Set(data.map(function (item) {
|
|
887
|
+
return _this4.getRowId({
|
|
888
|
+
data: item
|
|
889
|
+
});
|
|
890
|
+
}));
|
|
850
891
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
892
|
+
_this4.selected.forEach(function (id) {
|
|
893
|
+
if (!keys.has(id)) {
|
|
894
|
+
_this4.selected.delete(id);
|
|
895
|
+
} else {
|
|
896
|
+
var node = _this4.api.getRowNode(id);
|
|
854
897
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
898
|
+
if (node !== undefined && !node.isSelected()) {
|
|
899
|
+
node.setSelected(true, false, true);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
if (_this4.selected.isDirty()) {
|
|
906
|
+
_this4.api.dispatchEvent({
|
|
907
|
+
type: 'selectionChanged'
|
|
908
|
+
});
|
|
909
|
+
}
|
|
858
910
|
});
|
|
859
911
|
}
|
|
860
912
|
}, {
|
|
@@ -1173,7 +1225,44 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1173
1225
|
total = _this$state2.total,
|
|
1174
1226
|
loading = _this$state2.loading;
|
|
1175
1227
|
var mPage = _typeof(pagination) === 'object' ? pagination : {};
|
|
1176
|
-
var
|
|
1228
|
+
var enableFooterSelection = this.isPreserveSelected();
|
|
1229
|
+
var footer = [];
|
|
1230
|
+
|
|
1231
|
+
if (enableFooterSelection) {
|
|
1232
|
+
footer.push( /*#__PURE__*/React.createElement(Selected, {
|
|
1233
|
+
selection: this.selected,
|
|
1234
|
+
onClear: this.handleClearSelected,
|
|
1235
|
+
key: "selection"
|
|
1236
|
+
}));
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if (enablePagination) {
|
|
1240
|
+
footer.push( /*#__PURE__*/React.createElement(Pagination, _extends({
|
|
1241
|
+
key: "pagination",
|
|
1242
|
+
size: "small",
|
|
1243
|
+
showPrevNextJumpers: true,
|
|
1244
|
+
showSizeChanger: true,
|
|
1245
|
+
showQuickJumper: true,
|
|
1246
|
+
showTotal: function showTotal(val) {
|
|
1247
|
+
return "\u5171".concat(val, "\u6761");
|
|
1248
|
+
},
|
|
1249
|
+
defaultCurrent: 1,
|
|
1250
|
+
defaultPageSize: 20,
|
|
1251
|
+
pageSizeOptions: ['10', '20', '50', '100']
|
|
1252
|
+
}, mPage, {
|
|
1253
|
+
pageSize: pageSize,
|
|
1254
|
+
current: page,
|
|
1255
|
+
total: total,
|
|
1256
|
+
onChange: function onChange(curr, limit) {
|
|
1257
|
+
_this10.pagination(curr, limit);
|
|
1258
|
+
|
|
1259
|
+
if (mPage.onChange) {
|
|
1260
|
+
mPage.onChange(curr, limit);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
})));
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1177
1266
|
return /*#__PURE__*/React.createElement(GridStoreContext.Provider, {
|
|
1178
1267
|
value: this.store
|
|
1179
1268
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1196,6 +1285,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1196
1285
|
pinnedBottomRowData: Array.isArray(summary) ? summary : summary ? [summary] : undefined,
|
|
1197
1286
|
masterDetail: detailCell !== undefined
|
|
1198
1287
|
}, this.getMemoizedDetailCellParams(detailCell, detailCellRendererParams), restProps, {
|
|
1288
|
+
getRowStyle: this.getRowStyle,
|
|
1199
1289
|
stopEditingWhenCellsLoseFocus: false,
|
|
1200
1290
|
onRowDataUpdated: this.rowDataUpdated,
|
|
1201
1291
|
onCellValueChanged: this.cellValueChanged,
|
|
@@ -1206,38 +1296,13 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1206
1296
|
getRowId: this.getRowId,
|
|
1207
1297
|
onGridReady: this.init,
|
|
1208
1298
|
context: context,
|
|
1209
|
-
rowSelection:
|
|
1299
|
+
rowSelection: rowSelection !== undefined ? rowSelection.type !== 'radio' ? 'multiple' : 'single' : undefined,
|
|
1210
1300
|
components: this.getMemoizedComponents(componentsProp),
|
|
1211
1301
|
defaultColDef: this.getMemoizedDefaultColDef(defaultColDefProp),
|
|
1212
1302
|
columnTypes: this.getMemoizedColumnTypes(columnTypesProp)
|
|
1213
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1303
|
+
})), footer.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
1214
1304
|
className: prefix('bottom')
|
|
1215
|
-
},
|
|
1216
|
-
selection: this.selected,
|
|
1217
|
-
onClear: this.handleClearSelected
|
|
1218
|
-
}) : null), enablePagination && /*#__PURE__*/React.createElement(Pagination, _extends({
|
|
1219
|
-
size: "small",
|
|
1220
|
-
showPrevNextJumpers: true,
|
|
1221
|
-
showSizeChanger: true,
|
|
1222
|
-
showQuickJumper: true,
|
|
1223
|
-
showTotal: function showTotal(val) {
|
|
1224
|
-
return "\u5171".concat(val, "\u6761");
|
|
1225
|
-
},
|
|
1226
|
-
defaultCurrent: 1,
|
|
1227
|
-
defaultPageSize: 20,
|
|
1228
|
-
pageSizeOptions: ['10', '20', '50', '100']
|
|
1229
|
-
}, mPage, {
|
|
1230
|
-
pageSize: pageSize,
|
|
1231
|
-
current: page,
|
|
1232
|
-
total: total,
|
|
1233
|
-
onChange: function onChange(curr, limit) {
|
|
1234
|
-
_this10.pagination(curr, limit);
|
|
1235
|
-
|
|
1236
|
-
if (mPage.onChange) {
|
|
1237
|
-
mPage.onChange(curr, limit);
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}))), loading && /*#__PURE__*/React.createElement(Spin, {
|
|
1305
|
+
}, footer), loading && /*#__PURE__*/React.createElement(Spin, {
|
|
1241
1306
|
className: prefix('spin')
|
|
1242
1307
|
})));
|
|
1243
1308
|
}
|
|
@@ -55,6 +55,10 @@ export declare type ColsType<T> = (ColType<T> | ColGroupType<T>)[];
|
|
|
55
55
|
export declare type RowSelectionType<T = any> = {
|
|
56
56
|
type?: 'checkbox' | 'radio';
|
|
57
57
|
selectedRowKeys?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* @description 数据源更改是否保留所选项,远程模式默认开启,非远程模式默认关闭
|
|
60
|
+
*/
|
|
61
|
+
preserveSelectedRowKeys?: boolean;
|
|
58
62
|
defaultSelectedRowKeys?: string[];
|
|
59
63
|
fixed?: boolean;
|
|
60
64
|
checkboxSelection?: boolean;
|
|
@@ -251,10 +251,10 @@ export var Selection = /*#__PURE__*/function () {
|
|
|
251
251
|
}();
|
|
252
252
|
export var columnTypes = {
|
|
253
253
|
datetime: {
|
|
254
|
-
initialWidth:
|
|
254
|
+
initialWidth: 160
|
|
255
255
|
},
|
|
256
256
|
date: {
|
|
257
|
-
initialWidth:
|
|
257
|
+
initialWidth: 130,
|
|
258
258
|
valueFormatter: function valueFormatter(_ref) {
|
|
259
259
|
var value = _ref.value;
|
|
260
260
|
|
|
@@ -293,6 +293,11 @@ export var columnTypes = {
|
|
|
293
293
|
cellRenderer: CellIndexRender,
|
|
294
294
|
initialWidth: 45,
|
|
295
295
|
suppressMenu: true,
|
|
296
|
-
|
|
296
|
+
valueGetter: function valueGetter(_ref3) {
|
|
297
|
+
var node = _ref3.node;
|
|
298
|
+
return node === null || node === void 0 ? void 0 : node.rowIndex;
|
|
299
|
+
},
|
|
300
|
+
cellClass: prefix('cell-align-center'),
|
|
301
|
+
sortable: false
|
|
297
302
|
}
|
|
298
303
|
};
|
|
@@ -70,7 +70,7 @@ var defaultOptions = [{
|
|
|
70
70
|
}];
|
|
71
71
|
|
|
72
72
|
function DurationPicker(props) {
|
|
73
|
-
var _result$type, _result$option
|
|
73
|
+
var _result$type, _result$option;
|
|
74
74
|
|
|
75
75
|
var _props$prefixCls = props.prefixCls,
|
|
76
76
|
prefixCls = _props$prefixCls === void 0 ? PREFIX_CLS : _props$prefixCls,
|
|
@@ -145,7 +145,7 @@ function DurationPicker(props) {
|
|
|
145
145
|
var newDurationPickerValue = _objectSpread(_objectSpread({}, value), {}, {
|
|
146
146
|
dates: item.value !== null ? item.value().map(function (date) {
|
|
147
147
|
return date.format(dateFormat);
|
|
148
|
-
}) :
|
|
148
|
+
}) : value.dates,
|
|
149
149
|
option: item.label
|
|
150
150
|
});
|
|
151
151
|
|
|
@@ -205,8 +205,7 @@ function DurationPicker(props) {
|
|
|
205
205
|
className: "".concat(prefixCls, "-duration-option")
|
|
206
206
|
}, (_result$option = result.option) === null || _result$option === void 0 ? void 0 : _result$option.label, /*#__PURE__*/React.createElement(Down, null))), /*#__PURE__*/React.createElement(DatePicker.RangePicker, _extends({
|
|
207
207
|
value: result.dates,
|
|
208
|
-
onChange: handleChangeDates
|
|
209
|
-
disabled: ((_result$option2 = result.option) === null || _result$option2 === void 0 ? void 0 : _result$option2.value) !== null
|
|
208
|
+
onChange: handleChangeDates
|
|
210
209
|
}, restProps))));
|
|
211
210
|
}
|
|
212
211
|
|
|
@@ -42,9 +42,9 @@ import classNames from 'classnames';
|
|
|
42
42
|
import Icons from "../Icons";
|
|
43
43
|
import DurationPicker from "../DurationPicker";
|
|
44
44
|
import FormLayout from "../FormLayout";
|
|
45
|
-
import { PREFIX_CLS } from "../../constants";
|
|
46
45
|
import TabBar from "../TabBar";
|
|
47
46
|
import Dropdown from "../Dropdown";
|
|
47
|
+
import { prefixClassName } from "../utils";
|
|
48
48
|
var components = [{
|
|
49
49
|
type: 'input',
|
|
50
50
|
render: function render(item) {
|
|
@@ -121,7 +121,7 @@ function Filter(props) {
|
|
|
121
121
|
simple = props.simple,
|
|
122
122
|
_props$defaultCollaps = props.defaultCollapsed,
|
|
123
123
|
defaultCollapsed = _props$defaultCollaps === void 0 ? true : _props$defaultCollaps;
|
|
124
|
-
var
|
|
124
|
+
var prefix = prefixClassName('filter');
|
|
125
125
|
var emptyValue = useMemo(function () {
|
|
126
126
|
return Object.fromEntries(data.map(function (item) {
|
|
127
127
|
return [item.key, undefined];
|
|
@@ -413,31 +413,45 @@ function Filter(props) {
|
|
|
413
413
|
return [getSet(result), false];
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
var
|
|
416
|
+
var btnWidth = simple ? 204 : 240;
|
|
417
417
|
var btnsVisible = false;
|
|
418
|
-
var
|
|
419
|
-
var
|
|
418
|
+
var end = result.length;
|
|
419
|
+
var row = 0;
|
|
420
|
+
var space = width;
|
|
420
421
|
|
|
421
422
|
for (var i = 0; i < result.length; i++) {
|
|
422
423
|
var _compMap$get;
|
|
423
424
|
|
|
424
425
|
var item = result[i];
|
|
425
426
|
var itemWidth = getColStyle(item.colSpan || (item.type ? (_compMap$get = compMap.get(item.type)) === null || _compMap$get === void 0 ? void 0 : _compMap$get.colSpan : 1)).width;
|
|
426
|
-
size += itemWidth;
|
|
427
427
|
|
|
428
|
-
if (
|
|
428
|
+
if (space <= itemWidth) {
|
|
429
|
+
row += 1;
|
|
430
|
+
|
|
431
|
+
if (space < width) {
|
|
432
|
+
if (itemWidth > width) {
|
|
433
|
+
row += 1;
|
|
434
|
+
space = width;
|
|
435
|
+
} else {
|
|
436
|
+
space = width - itemWidth;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
} else {
|
|
440
|
+
space -= itemWidth;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (btnWidth > space && row === 1 || row === 2) {
|
|
429
444
|
btnsVisible = true;
|
|
445
|
+
end = i;
|
|
430
446
|
break;
|
|
431
447
|
}
|
|
432
|
-
|
|
433
|
-
end = i;
|
|
434
448
|
}
|
|
435
449
|
|
|
436
450
|
if (!collapsed) {
|
|
437
451
|
return [getSet(result), btnsVisible];
|
|
438
452
|
}
|
|
439
453
|
|
|
440
|
-
return [getSet(result.slice(0, end
|
|
454
|
+
return [getSet(result.slice(0, end)), btnsVisible];
|
|
441
455
|
}, [data, width, collapsed, simple, activeKeys]),
|
|
442
456
|
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
443
457
|
cols = _useMemo2[0],
|
|
@@ -450,7 +464,7 @@ function Filter(props) {
|
|
|
450
464
|
}
|
|
451
465
|
}
|
|
452
466
|
}, /*#__PURE__*/React.createElement("div", {
|
|
453
|
-
className: classNames(
|
|
467
|
+
className: classNames(prefix(), _defineProperty({}, prefix('simple'), simple)),
|
|
454
468
|
style: style
|
|
455
469
|
}, /*#__PURE__*/React.createElement(Modal, {
|
|
456
470
|
destroyOnClose: true,
|
|
@@ -485,11 +499,16 @@ function Filter(props) {
|
|
|
485
499
|
onTabClick: function onTabClick(_, index) {
|
|
486
500
|
return handleTabChange(index);
|
|
487
501
|
},
|
|
488
|
-
className:
|
|
502
|
+
className: prefix('tab-bar')
|
|
489
503
|
}), /*#__PURE__*/React.createElement(FormLayout, {
|
|
490
|
-
direction: "row"
|
|
504
|
+
direction: "row",
|
|
505
|
+
layout: "flex",
|
|
506
|
+
style: !width ? {
|
|
507
|
+
maxHeight: 72,
|
|
508
|
+
overflowY: 'hidden'
|
|
509
|
+
} : undefined
|
|
491
510
|
}, data.map(function (item) {
|
|
492
|
-
var className = classNames(
|
|
511
|
+
var className = classNames(prefix('form-item'), {
|
|
493
512
|
hidden: !cols.has(item.key) ? true : false
|
|
494
513
|
});
|
|
495
514
|
|
|
@@ -521,9 +540,9 @@ function Filter(props) {
|
|
|
521
540
|
initialValue: item.initialValue
|
|
522
541
|
}, target.render(item)));
|
|
523
542
|
}), /*#__PURE__*/React.createElement("div", {
|
|
524
|
-
className:
|
|
543
|
+
className: prefix('btns')
|
|
525
544
|
}, /*#__PURE__*/React.createElement("div", {
|
|
526
|
-
className:
|
|
545
|
+
className: prefix('submit')
|
|
527
546
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
528
547
|
type: "primary",
|
|
529
548
|
htmlType: "submit"
|
|
@@ -542,7 +561,7 @@ function Filter(props) {
|
|
|
542
561
|
fill: "none",
|
|
543
562
|
fillRule: "evenodd"
|
|
544
563
|
})),
|
|
545
|
-
className: "".concat(
|
|
564
|
+
className: "".concat(prefix('reset'), " ").concat(prefix('btn')),
|
|
546
565
|
onClick: handleReset
|
|
547
566
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
548
567
|
actions: [{
|
|
@@ -559,22 +578,22 @@ function Filter(props) {
|
|
|
559
578
|
icon: /*#__PURE__*/React.createElement(Icons.More, null)
|
|
560
579
|
})), /*#__PURE__*/React.createElement(Popover, {
|
|
561
580
|
trigger: "click",
|
|
562
|
-
overlayClassName:
|
|
581
|
+
overlayClassName: prefix('popover'),
|
|
563
582
|
destroyTooltipOnHide: true,
|
|
564
583
|
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, {
|
|
565
584
|
placeholder: "\u641C\u7D22\u9009\u9879",
|
|
566
585
|
allowClear: true,
|
|
567
|
-
className:
|
|
586
|
+
className: prefix('items-search'),
|
|
568
587
|
prefix: /*#__PURE__*/React.createElement(Icons.Search, null),
|
|
569
588
|
onChange: function onChange(e) {
|
|
570
589
|
return handleChangeKeywords(e.currentTarget.value);
|
|
571
590
|
}
|
|
572
591
|
}), /*#__PURE__*/React.createElement("div", {
|
|
573
|
-
className:
|
|
592
|
+
className: prefix('items')
|
|
574
593
|
}, items.length > 0 ? items.map(function (item) {
|
|
575
594
|
return /*#__PURE__*/React.createElement("div", {
|
|
576
595
|
key: item.key,
|
|
577
|
-
className:
|
|
596
|
+
className: prefix('item')
|
|
578
597
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
579
598
|
checked: activeKeys.has(item.key),
|
|
580
599
|
onChange: function onChange(e) {
|
|
@@ -586,7 +605,7 @@ function Filter(props) {
|
|
|
586
605
|
}))),
|
|
587
606
|
placement: "bottomRight"
|
|
588
607
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
589
|
-
className:
|
|
608
|
+
className: prefix('btn'),
|
|
590
609
|
onClick: function onClick() {
|
|
591
610
|
setKeywords('');
|
|
592
611
|
},
|
|
@@ -601,7 +620,7 @@ function Filter(props) {
|
|
|
601
620
|
});
|
|
602
621
|
},
|
|
603
622
|
type: "link",
|
|
604
|
-
className:
|
|
623
|
+
className: prefix('collapse')
|
|
605
624
|
}, collapsed ? '高级搜索' : '收起搜索', /*#__PURE__*/React.createElement("svg", {
|
|
606
625
|
width: "10",
|
|
607
626
|
height: "10",
|