@ccs-ui/rc-pro 1.0.7-rc.9 → 1.1.0
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/auth/auth-button.d.ts +1 -2
- package/es/auth/index.d.ts +11 -4
- package/es/cascader/index.d.ts +2 -3
- package/es/cascader/index.js +3 -2
- package/es/color-picker/index.d.ts +2 -2
- package/es/config.d.ts +1 -2
- package/es/config.js +5 -4
- package/es/context/index.d.ts +25 -12
- package/es/context/index.js +1 -6
- package/es/date-picker/index.d.ts +2 -3
- package/es/dialog/HookDrawer.d.ts +8 -0
- package/es/dialog/HookDrawer.js +106 -0
- package/es/dialog/HookModal.d.ts +8 -0
- package/es/dialog/HookModal.js +179 -0
- package/es/dialog/button.d.ts +10 -0
- package/es/dialog/button.js +47 -0
- package/es/dialog/context.d.ts +11 -0
- package/es/dialog/context.js +10 -0
- package/es/dialog/dialog.d.ts +41 -0
- package/es/dialog/dialog.js +167 -0
- package/es/dialog/form.d.ts +13 -0
- package/es/dialog/form.js +47 -0
- package/es/dialog/index.d.ts +11 -0
- package/es/dialog/index.js +9 -0
- package/es/dialog/index.less +28 -0
- package/es/dialog/usePatchElement.d.ts +5 -0
- package/es/dialog/usePatchElement.js +35 -0
- package/es/drawer/buttons.d.ts +2 -2
- package/es/drawer/index.d.ts +3 -0
- package/es/drawer/index.js +3 -0
- package/es/drawer/open/content.d.ts +3 -3
- package/es/drawer/open/form.d.ts +2 -2
- package/es/drawer/open/index.js +1 -6
- package/es/full-screen/index.d.ts +1 -2
- package/es/full-screen/index.js +29 -26
- package/es/hooks/use-tabs.d.ts +1 -1
- package/es/hooks/use-window.d.ts +4 -0
- package/es/hooks/use-window.js +5 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/interval-button/index.d.ts +1 -2
- package/es/interval-button/index.js +1 -1
- package/es/keep-alive-tabs/index.d.ts +1 -2
- package/es/keep-alive-tabs/page.d.ts +1 -1
- package/es/loading/index.d.ts +1 -2
- package/es/loading/index.js +25 -21
- package/es/modal/buttons.d.ts +2 -2
- package/es/modal/index.d.ts +3 -0
- package/es/modal/index.js +3 -0
- package/es/modal/open/drag.d.ts +1 -2
- package/es/modal/open/form.d.ts +2 -2
- package/es/pro-grid/index.d.ts +2 -2
- package/es/pro-table/index.d.ts +6 -2
- package/es/pro-table/index.js +75 -53
- package/es/pro-table/index.less +5 -14
- package/es/pro-table/search.d.ts +4 -3
- package/es/pro-table/search.js +221 -175
- package/es/pro-tabs/index.d.ts +1 -2
- package/es/pro-tabs/index.js +102 -31
- package/es/select/index.d.ts +2 -3
- package/es/select/index.js +3 -2
- package/es/status-tag/index.js +6 -5
- package/es/table/index.d.ts +1 -2
- package/es/time-picker/index.d.ts +2 -3
- package/es/trigger/index.d.ts +2 -2
- package/es/upload/index.d.ts +1 -2
- package/es/upload/upload-image.d.ts +1 -2
- package/es/utils/index.d.ts +7 -7
- package/es/utils/index.js +33 -27
- package/es/virtual-list/index.d.ts +2 -2
- package/es/water-mark/index.d.ts +1 -1
- package/package.json +4 -3
package/es/pro-table/search.js
CHANGED
|
@@ -12,9 +12,12 @@ import { MoreOutlined, RedoOutlined, SettingOutlined, UpOutlined } from '@ant-de
|
|
|
12
12
|
import { Button, Checkbox, Col, Dropdown, Form, Row, Tooltip } from 'antd';
|
|
13
13
|
import _debounce from 'lodash/debounce';
|
|
14
14
|
import ResizeObserver from 'rc-resize-observer';
|
|
15
|
-
import
|
|
15
|
+
import { cloneElement, useMemo, useRef, useState } from 'react';
|
|
16
16
|
import { classPrefix } from '.';
|
|
17
17
|
import { CcsFullScreenButton } from '..';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
21
|
/** 查找所有父级依赖 */
|
|
19
22
|
var getShowDpends = function getShowDpends(items, item, depends) {
|
|
20
23
|
var showDepends = item.showDepends;
|
|
@@ -40,15 +43,16 @@ var getShowDpends = function getShowDpends(items, item, depends) {
|
|
|
40
43
|
/** 操作按钮、查询,重置、列筛选、 */
|
|
41
44
|
function SearchComponent(_ref) {
|
|
42
45
|
var form = _ref.form,
|
|
46
|
+
event$ = _ref.event$,
|
|
43
47
|
toolbar = _ref.toolbar,
|
|
44
48
|
columns = _ref.columns,
|
|
45
|
-
|
|
49
|
+
children = _ref.children,
|
|
46
50
|
expandForm = _ref.expandForm,
|
|
47
51
|
_ref$formItems = _ref.formItems,
|
|
48
52
|
formItems = _ref$formItems === void 0 ? [] : _ref$formItems,
|
|
49
53
|
formInitValues = _ref.formInitValues,
|
|
50
54
|
isInModalOrDrawer = _ref.isInModalOrDrawer,
|
|
51
|
-
|
|
55
|
+
disableCollapseForm = _ref.disableCollapseForm,
|
|
52
56
|
onReset = _ref.onReset,
|
|
53
57
|
onSearch = _ref.onSearch;
|
|
54
58
|
var _useState = useState(false),
|
|
@@ -68,6 +72,19 @@ function SearchComponent(_ref) {
|
|
|
68
72
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
69
73
|
colSpan = _useState8[0],
|
|
70
74
|
setColSpan = _useState8[1];
|
|
75
|
+
var _useState9 = useState(function () {
|
|
76
|
+
var hasMain = formItems.filter(function (f) {
|
|
77
|
+
return f.isMain;
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// 所有都是主条件
|
|
81
|
+
if (hasMain.length === formItems.length) return false;
|
|
82
|
+
|
|
83
|
+
// 条件数大于1,有更多
|
|
84
|
+
return formItems.length > 1;
|
|
85
|
+
}),
|
|
86
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
87
|
+
hasMore = _useState10[0];
|
|
71
88
|
|
|
72
89
|
// 处理form item 依赖
|
|
73
90
|
var allFormItems = useMemo(function () {
|
|
@@ -92,14 +109,14 @@ function SearchComponent(_ref) {
|
|
|
92
109
|
return c.hidden;
|
|
93
110
|
}));
|
|
94
111
|
};
|
|
95
|
-
var
|
|
96
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
97
|
-
isCheckAll = _useState10[0],
|
|
98
|
-
setIsCheckAll = _useState10[1];
|
|
99
|
-
var _useState11 = useState(getHalfCheckState),
|
|
112
|
+
var _useState11 = useState(true),
|
|
100
113
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
isCheckAll = _useState12[0],
|
|
115
|
+
setIsCheckAll = _useState12[1];
|
|
116
|
+
var _useState13 = useState(getHalfCheckState),
|
|
117
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
118
|
+
isHalfCheck = _useState14[0],
|
|
119
|
+
setIsHalfCheck = _useState14[1];
|
|
103
120
|
|
|
104
121
|
// 列选中事件
|
|
105
122
|
var onCheckChange = function onCheckChange(checked, index) {
|
|
@@ -150,11 +167,12 @@ function SearchComponent(_ref) {
|
|
|
150
167
|
var renderCheck = function renderCheck() {
|
|
151
168
|
var fc = [{
|
|
152
169
|
key: '1',
|
|
153
|
-
label: /*#__PURE__*/
|
|
170
|
+
label: /*#__PURE__*/_jsx(Checkbox, {
|
|
154
171
|
indeterminate: !isHalfCheck,
|
|
155
172
|
onChange: onCheckAllChange,
|
|
156
|
-
checked: isCheckAll
|
|
157
|
-
|
|
173
|
+
checked: isCheckAll,
|
|
174
|
+
children: "\u5168\u9009"
|
|
175
|
+
})
|
|
158
176
|
}, {
|
|
159
177
|
key: '2',
|
|
160
178
|
type: 'divider'
|
|
@@ -163,12 +181,13 @@ function SearchComponent(_ref) {
|
|
|
163
181
|
if (c.dataIndex) {
|
|
164
182
|
fc.push({
|
|
165
183
|
key: c.dataIndex,
|
|
166
|
-
label: /*#__PURE__*/
|
|
184
|
+
label: /*#__PURE__*/_jsx(Checkbox, {
|
|
167
185
|
checked: !c.hidden,
|
|
168
186
|
onChange: function onChange(e) {
|
|
169
187
|
return onCheckChange(e.target.checked, index);
|
|
170
|
-
}
|
|
171
|
-
|
|
188
|
+
},
|
|
189
|
+
children: c.title
|
|
190
|
+
})
|
|
172
191
|
});
|
|
173
192
|
}
|
|
174
193
|
});
|
|
@@ -182,62 +201,68 @@ function SearchComponent(_ref) {
|
|
|
182
201
|
};
|
|
183
202
|
|
|
184
203
|
// 操作按钮
|
|
185
|
-
var renderOperation = /*#__PURE__*/
|
|
186
|
-
className: "".concat(classPrefix, "-header-buttons")
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
204
|
+
var renderOperation = /*#__PURE__*/_jsxs("div", {
|
|
205
|
+
className: "".concat(classPrefix, "-header-buttons"),
|
|
206
|
+
children: [hasMore && !disableCollapseForm && /*#__PURE__*/_jsx(Button, {
|
|
207
|
+
className: "ccs-pl-expbtn",
|
|
208
|
+
onClick: function onClick() {
|
|
209
|
+
return setIsShowMore(!isShowMore);
|
|
210
|
+
},
|
|
211
|
+
icon: isShowMore ? /*#__PURE__*/_jsx(UpOutlined, {
|
|
212
|
+
className: "".concat(classPrefix, "-icon")
|
|
213
|
+
}) : /*#__PURE__*/_jsx(MoreOutlined, {
|
|
214
|
+
className: "".concat(classPrefix, "-icon")
|
|
215
|
+
}),
|
|
216
|
+
type: "text",
|
|
217
|
+
style: {
|
|
218
|
+
width: 24
|
|
219
|
+
}
|
|
220
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
221
|
+
title: "\u91CD\u7F6E",
|
|
222
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
223
|
+
className: "ccs-pl-rstbtn",
|
|
224
|
+
onClick: onReset,
|
|
225
|
+
icon: /*#__PURE__*/_jsx(RedoOutlined, {
|
|
226
|
+
className: "".concat(classPrefix, "-icon")
|
|
227
|
+
}),
|
|
228
|
+
type: "text",
|
|
229
|
+
style: {
|
|
230
|
+
width: 24
|
|
231
|
+
}
|
|
232
|
+
})
|
|
233
|
+
}), filterColumns && /*#__PURE__*/_jsx(Dropdown, {
|
|
234
|
+
menu: {
|
|
235
|
+
items: renderCheck()
|
|
236
|
+
},
|
|
237
|
+
trigger: ['click'],
|
|
238
|
+
open: dropdownVisible,
|
|
239
|
+
onOpenChange: function onOpenChange(flag) {
|
|
240
|
+
return setDropdownVisible(flag);
|
|
241
|
+
},
|
|
242
|
+
className: "ccs-pl-setbtn",
|
|
243
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
244
|
+
title: "\u5217\u8BBE\u7F6E",
|
|
245
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
246
|
+
icon: /*#__PURE__*/_jsx(SettingOutlined, {
|
|
247
|
+
className: "".concat(classPrefix, "-icon")
|
|
248
|
+
}),
|
|
249
|
+
type: "text",
|
|
250
|
+
style: {
|
|
251
|
+
width: 24
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
})
|
|
255
|
+
}), !isInModalOrDrawer && /*#__PURE__*/_jsx(CcsFullScreenButton, {
|
|
256
|
+
onFullScreen: onFullScreen
|
|
257
|
+
})]
|
|
258
|
+
});
|
|
233
259
|
|
|
234
260
|
// render item 判断是否有依赖
|
|
235
261
|
var renderFormItem = function renderFormItem(items) {
|
|
236
262
|
if (!items) return [];
|
|
237
263
|
return items.map(function (item) {
|
|
238
|
-
return item.depends || item.showDepends ? /*#__PURE__*/
|
|
264
|
+
return item.depends || item.showDepends ? /*#__PURE__*/_jsx(Form.Item, {
|
|
239
265
|
noStyle: true,
|
|
240
|
-
key: item.name,
|
|
241
266
|
shouldUpdate: function shouldUpdate(l, n) {
|
|
242
267
|
var _item$depends, _item$showDepends;
|
|
243
268
|
return ((_item$depends = item.depends) === null || _item$depends === void 0 ? void 0 : _item$depends.some(function (i) {
|
|
@@ -245,50 +270,54 @@ function SearchComponent(_ref) {
|
|
|
245
270
|
})) || ((_item$showDepends = item.showDepends) === null || _item$showDepends === void 0 ? void 0 : _item$showDepends.some(function (i) {
|
|
246
271
|
return l[i.name] !== n[i.name];
|
|
247
272
|
})) || false;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
});
|
|
257
|
-
var isShow = true;
|
|
258
|
-
if (item.showDepends && item.showDepends.length > 0) {
|
|
259
|
-
var _item$showDepends2;
|
|
260
|
-
isShow = (_item$showDepends2 = item.showDepends) === null || _item$showDepends2 === void 0 ? void 0 : _item$showDepends2.every(function (i) {
|
|
261
|
-
return getFieldValue(i.name) === i.value;
|
|
273
|
+
},
|
|
274
|
+
children: function children(_ref2) {
|
|
275
|
+
var _item$depends2;
|
|
276
|
+
var getFieldValue = _ref2.getFieldValue;
|
|
277
|
+
var dependParam = {};
|
|
278
|
+
(_item$depends2 = item.depends) === null || _item$depends2 === void 0 ? void 0 : _item$depends2.forEach(function (i) {
|
|
279
|
+
var value = getFieldValue(i);
|
|
280
|
+
dependParam[i] = value;
|
|
262
281
|
});
|
|
282
|
+
var isShow = true;
|
|
283
|
+
if (item.showDepends && item.showDepends.length > 0) {
|
|
284
|
+
var _item$showDepends2;
|
|
285
|
+
isShow = (_item$showDepends2 = item.showDepends) === null || _item$showDepends2 === void 0 ? void 0 : _item$showDepends2.every(function (i) {
|
|
286
|
+
return getFieldValue(i.name) === i.value;
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return isShow ? /*#__PURE__*/_jsx(Form.Item, {
|
|
290
|
+
name: "".concat(item.name),
|
|
291
|
+
label: item.label,
|
|
292
|
+
rules: item.rules,
|
|
293
|
+
children: /*#__PURE__*/cloneElement(item.value, dependParam)
|
|
294
|
+
}, item.name) : null;
|
|
263
295
|
}
|
|
264
|
-
|
|
265
|
-
name: "".concat(item.name),
|
|
266
|
-
label: item.label,
|
|
267
|
-
key: item.name,
|
|
268
|
-
rules: item.rules
|
|
269
|
-
}, /*#__PURE__*/cloneElement(item.value, dependParam)) : null;
|
|
270
|
-
}) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
296
|
+
}, item.name) : /*#__PURE__*/_jsx(Form.Item, {
|
|
271
297
|
name: item.name,
|
|
272
298
|
label: item.label,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}, item.
|
|
299
|
+
rules: item.rules,
|
|
300
|
+
children: item.value
|
|
301
|
+
}, item.name);
|
|
276
302
|
});
|
|
277
303
|
};
|
|
278
304
|
|
|
279
305
|
// 查询部分
|
|
280
306
|
var renderSearch = function renderSearch() {
|
|
281
|
-
if (!formItems.length) return /*#__PURE__*/
|
|
307
|
+
if (!formItems.length) return /*#__PURE__*/_jsx(Form.Item, {});
|
|
282
308
|
// 主条件
|
|
283
309
|
var mainItems = allFormItems.filter(function (f) {
|
|
284
310
|
return f.isMain;
|
|
285
311
|
});
|
|
286
312
|
var initFormItems = mainItems.length > 0 ? mainItems : [allFormItems[0]];
|
|
287
|
-
return /*#__PURE__*/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
313
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
314
|
+
children: [!isShowMore && renderFormItem(initFormItems), /*#__PURE__*/_jsx(Button, {
|
|
315
|
+
type: "primary",
|
|
316
|
+
onClick: function onClick() {},
|
|
317
|
+
htmlType: "submit",
|
|
318
|
+
children: "\u67E5\u8BE2"
|
|
319
|
+
})]
|
|
320
|
+
});
|
|
292
321
|
};
|
|
293
322
|
|
|
294
323
|
// 重设尺寸,当组件位于弹框中,根据容器宽度决定显示尺寸
|
|
@@ -316,85 +345,102 @@ function SearchComponent(_ref) {
|
|
|
316
345
|
resizeFn(size.width);
|
|
317
346
|
};
|
|
318
347
|
var renderMoreForm = function renderMoreForm() {
|
|
319
|
-
return /*#__PURE__*/
|
|
320
|
-
onResize: onResize
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
348
|
+
return /*#__PURE__*/_jsx(ResizeObserver, {
|
|
349
|
+
onResize: onResize,
|
|
350
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
351
|
+
className: "".concat(classPrefix, "-high-form"),
|
|
352
|
+
ref: ref,
|
|
353
|
+
style: {
|
|
354
|
+
maxHeight: isShowMore ? 500 : 0,
|
|
355
|
+
overflow: 'hidden'
|
|
356
|
+
},
|
|
357
|
+
children: /*#__PURE__*/_jsx(Form, {
|
|
358
|
+
initialValues: formInitValues,
|
|
359
|
+
form: form,
|
|
360
|
+
onFinish: onSearch,
|
|
361
|
+
layout: "horizontal",
|
|
362
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
363
|
+
gutter: 16,
|
|
364
|
+
style: {
|
|
365
|
+
justifyContent: 23 / colSpan > allFormItems.length ? 'flex-end' : 'flex-start'
|
|
366
|
+
},
|
|
367
|
+
children: allFormItems.map(function (item) {
|
|
368
|
+
return item.depends || item.showDepends ? /*#__PURE__*/_jsx(Form.Item, {
|
|
369
|
+
noStyle: true,
|
|
370
|
+
shouldUpdate: function shouldUpdate(l, n) {
|
|
371
|
+
var _item$depends3, _item$showDepends3;
|
|
372
|
+
return ((_item$depends3 = item.depends) === null || _item$depends3 === void 0 ? void 0 : _item$depends3.some(function (i) {
|
|
373
|
+
return l[i] !== n[i];
|
|
374
|
+
})) || ((_item$showDepends3 = item.showDepends) === null || _item$showDepends3 === void 0 ? void 0 : _item$showDepends3.some(function (i) {
|
|
375
|
+
return l[i.name] !== n[i.name];
|
|
376
|
+
})) || false;
|
|
377
|
+
},
|
|
378
|
+
children: function children(_ref3) {
|
|
379
|
+
var _item$depends4;
|
|
380
|
+
var getFieldValue = _ref3.getFieldValue;
|
|
381
|
+
var dependParam = {};
|
|
382
|
+
(_item$depends4 = item.depends) === null || _item$depends4 === void 0 ? void 0 : _item$depends4.forEach(function (i) {
|
|
383
|
+
var value = getFieldValue(i);
|
|
384
|
+
dependParam[i] = value;
|
|
385
|
+
});
|
|
386
|
+
var isShow = true;
|
|
387
|
+
if (item.showDepends && item.showDepends.length > 0) {
|
|
388
|
+
var _item$showDepends4;
|
|
389
|
+
isShow = (_item$showDepends4 = item.showDepends) === null || _item$showDepends4 === void 0 ? void 0 : _item$showDepends4.every(function (i) {
|
|
390
|
+
return getFieldValue(i.name) === i.value;
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
return isShow ? /*#__PURE__*/_jsx(Col, {
|
|
394
|
+
span: colSpan,
|
|
395
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
396
|
+
className: "".concat(classPrefix, "-form-label"),
|
|
397
|
+
label: item.label,
|
|
398
|
+
name: item.name,
|
|
399
|
+
rules: item.rules,
|
|
400
|
+
children: /*#__PURE__*/cloneElement(item.value, dependParam)
|
|
401
|
+
})
|
|
402
|
+
}) : null;
|
|
403
|
+
}
|
|
404
|
+
}, item.name) : /*#__PURE__*/_jsx(Col, {
|
|
405
|
+
span: colSpan,
|
|
406
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
407
|
+
className: "".concat(classPrefix, "-form-label"),
|
|
408
|
+
rules: item.rules,
|
|
409
|
+
label: item.label,
|
|
410
|
+
name: item.name,
|
|
411
|
+
children: item.value
|
|
412
|
+
})
|
|
413
|
+
}, item.name);
|
|
414
|
+
})
|
|
415
|
+
})
|
|
416
|
+
})
|
|
417
|
+
})
|
|
418
|
+
});
|
|
380
419
|
};
|
|
381
|
-
return /*#__PURE__*/
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
420
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
421
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
422
|
+
style: {
|
|
423
|
+
padding: 16,
|
|
424
|
+
background: '#fff'
|
|
425
|
+
},
|
|
426
|
+
children: [(hasMore || expandForm) && renderMoreForm(), /*#__PURE__*/_jsxs("div", {
|
|
427
|
+
className: "".concat(classPrefix, "-header"),
|
|
428
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
429
|
+
className: "".concat(classPrefix, "-toolbar"),
|
|
430
|
+
children: toolbar
|
|
431
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
432
|
+
className: "".concat(classPrefix, "-form"),
|
|
433
|
+
children: [/*#__PURE__*/_jsx(Form, {
|
|
434
|
+
initialValues: formInitValues,
|
|
435
|
+
form: form,
|
|
436
|
+
onFinish: onSearch,
|
|
437
|
+
layout: "inline",
|
|
438
|
+
labelWrap: false,
|
|
439
|
+
children: renderSearch()
|
|
440
|
+
}), renderOperation]
|
|
441
|
+
})]
|
|
442
|
+
}), children]
|
|
443
|
+
})
|
|
444
|
+
});
|
|
399
445
|
}
|
|
400
446
|
export default SearchComponent;
|
package/es/pro-tabs/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { TabsProps } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import './index.less';
|
|
4
3
|
interface PropsType {
|
|
5
4
|
children: TabsProps;
|
|
6
5
|
}
|
|
7
|
-
declare const _default: ({ children }: PropsType) =>
|
|
6
|
+
declare const _default: ({ children }: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default _default;
|