@fle-ui/plus-table 1.1.1 → 1.1.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/index.js +43 -42
- package/lib/index.js +43 -42
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -238,6 +238,38 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
238
238
|
value: columnsStateMap,
|
|
239
239
|
onChange: handleOnChangeColumn //列状态的值发生改变之后触发
|
|
240
240
|
};
|
|
241
|
+
var propsRequest = /*#__PURE__*/function () {
|
|
242
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
243
|
+
var _searchRef$current3, _drawFormRef$current2;
|
|
244
|
+
var res1, res2, res;
|
|
245
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
246
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
247
|
+
case 0:
|
|
248
|
+
_context6.next = 2;
|
|
249
|
+
return searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current3 = searchRef.current) === null || _searchRef$current3 === void 0 ? void 0 : _searchRef$current3.getFieldsValue();
|
|
250
|
+
case 2:
|
|
251
|
+
res1 = _context6.sent;
|
|
252
|
+
_context6.next = 5;
|
|
253
|
+
return drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current2 = drawFormRef.current) === null || _drawFormRef$current2 === void 0 ? void 0 : _drawFormRef$current2.getFieldsValue();
|
|
254
|
+
case 5:
|
|
255
|
+
res2 = _context6.sent;
|
|
256
|
+
_context6.next = 8;
|
|
257
|
+
return request(_objectSpread(_objectSpread(_objectSpread({}, params), dealFetchParams(_objectSpread(_objectSpread(_objectSpread({}, res1), res2), params))), {}, {
|
|
258
|
+
showFull: showFull
|
|
259
|
+
}));
|
|
260
|
+
case 8:
|
|
261
|
+
res = _context6.sent;
|
|
262
|
+
return _context6.abrupt("return", res);
|
|
263
|
+
case 10:
|
|
264
|
+
case "end":
|
|
265
|
+
return _context6.stop();
|
|
266
|
+
}
|
|
267
|
+
}, _callee6);
|
|
268
|
+
}));
|
|
269
|
+
return function propsRequest(_x2) {
|
|
270
|
+
return _ref5.apply(this, arguments);
|
|
271
|
+
};
|
|
272
|
+
}();
|
|
241
273
|
return /*#__PURE__*/React.createElement("div", {
|
|
242
274
|
className: !searchDrawer ? 'page_plustable__body' : 'page_plustable__body turn-left'
|
|
243
275
|
}, /*#__PURE__*/React.createElement(ProTable, _extends({}, otherProps, {
|
|
@@ -278,8 +310,8 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
278
310
|
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(_Button, {
|
|
279
311
|
type: "default",
|
|
280
312
|
onClick: function onClick() {
|
|
281
|
-
var _drawFormRef$
|
|
282
|
-
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$
|
|
313
|
+
var _drawFormRef$current3;
|
|
314
|
+
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current3 = drawFormRef.current) === null || _drawFormRef$current3 === void 0 ? void 0 : _drawFormRef$current3.resetFields();
|
|
283
315
|
actionRef.current.reset();
|
|
284
316
|
actionRef.current.reload();
|
|
285
317
|
},
|
|
@@ -287,21 +319,21 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
287
319
|
}, "\u91CD\u7F6E"),, columns.filter(function (item) {
|
|
288
320
|
return item.search !== false;
|
|
289
321
|
}).length > 3 ? /*#__PURE__*/React.createElement("a", {
|
|
290
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
291
|
-
var _drawFormRef$
|
|
292
|
-
return _regeneratorRuntime().wrap(function
|
|
293
|
-
while (1) switch (
|
|
322
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
323
|
+
var _drawFormRef$current4, _searchRef$current4;
|
|
324
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
325
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
294
326
|
case 0:
|
|
295
|
-
|
|
327
|
+
_context7.next = 2;
|
|
296
328
|
return setSearchDrawer(!searchDrawer);
|
|
297
329
|
case 2:
|
|
298
330
|
// 没法实时监听数据所以这里要带过来
|
|
299
|
-
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$
|
|
331
|
+
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current4 = drawFormRef.current) === null || _drawFormRef$current4 === void 0 ? void 0 : _drawFormRef$current4.setFieldsValue(searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.getFieldsValue());
|
|
300
332
|
case 3:
|
|
301
333
|
case "end":
|
|
302
|
-
return
|
|
334
|
+
return _context7.stop();
|
|
303
335
|
}
|
|
304
|
-
},
|
|
336
|
+
}, _callee7);
|
|
305
337
|
}))
|
|
306
338
|
}, /*#__PURE__*/React.createElement(BarsOutlined, null), "\u9AD8\u7EA7\u7B5B\u9009") : null];
|
|
307
339
|
}
|
|
@@ -309,38 +341,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
309
341
|
// 根据用户自定义的配置 如果配置了列设置就有这个配置完全受控
|
|
310
342
|
,
|
|
311
343
|
columnsState: (action === null || action === void 0 ? void 0 : action.includes('columnSetting')) ? columnsState : props.columnsState,
|
|
312
|
-
request:
|
|
313
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
|
|
314
|
-
var _searchRef$current4, _drawFormRef$current4;
|
|
315
|
-
var res1, res2, res;
|
|
316
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
317
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
318
|
-
case 0:
|
|
319
|
-
_context7.next = 2;
|
|
320
|
-
return searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.getFieldsValue();
|
|
321
|
-
case 2:
|
|
322
|
-
res1 = _context7.sent;
|
|
323
|
-
_context7.next = 5;
|
|
324
|
-
return drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current4 = drawFormRef.current) === null || _drawFormRef$current4 === void 0 ? void 0 : _drawFormRef$current4.getFieldsValue();
|
|
325
|
-
case 5:
|
|
326
|
-
res2 = _context7.sent;
|
|
327
|
-
_context7.next = 8;
|
|
328
|
-
return request(_objectSpread(_objectSpread(_objectSpread({}, params), dealFetchParams(_objectSpread(_objectSpread(_objectSpread({}, res1), res2), params))), {}, {
|
|
329
|
-
showFull: showFull
|
|
330
|
-
}));
|
|
331
|
-
case 8:
|
|
332
|
-
res = _context7.sent;
|
|
333
|
-
return _context7.abrupt("return", res);
|
|
334
|
-
case 10:
|
|
335
|
-
case "end":
|
|
336
|
-
return _context7.stop();
|
|
337
|
-
}
|
|
338
|
-
}, _callee7);
|
|
339
|
-
}));
|
|
340
|
-
return function (_x2) {
|
|
341
|
-
return _ref6.apply(this, arguments);
|
|
342
|
-
};
|
|
343
|
-
}())
|
|
344
|
+
request: request ? propsRequest : undefined
|
|
344
345
|
// 同步高筛配置 只有高筛 才有特殊的配置 (baseSearch才会生效)
|
|
345
346
|
,
|
|
346
347
|
columns: (action === null || action === void 0 ? void 0 : action.includes('advancedFilter')) ? columns.map(function (item) {
|
package/lib/index.js
CHANGED
|
@@ -238,6 +238,38 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
238
238
|
value: columnsStateMap,
|
|
239
239
|
onChange: handleOnChangeColumn //列状态的值发生改变之后触发
|
|
240
240
|
};
|
|
241
|
+
var propsRequest = /*#__PURE__*/function () {
|
|
242
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
243
|
+
var _searchRef$current3, _drawFormRef$current2;
|
|
244
|
+
var res1, res2, res;
|
|
245
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
246
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
247
|
+
case 0:
|
|
248
|
+
_context6.next = 2;
|
|
249
|
+
return searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current3 = searchRef.current) === null || _searchRef$current3 === void 0 ? void 0 : _searchRef$current3.getFieldsValue();
|
|
250
|
+
case 2:
|
|
251
|
+
res1 = _context6.sent;
|
|
252
|
+
_context6.next = 5;
|
|
253
|
+
return drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current2 = drawFormRef.current) === null || _drawFormRef$current2 === void 0 ? void 0 : _drawFormRef$current2.getFieldsValue();
|
|
254
|
+
case 5:
|
|
255
|
+
res2 = _context6.sent;
|
|
256
|
+
_context6.next = 8;
|
|
257
|
+
return request(_objectSpread(_objectSpread(_objectSpread({}, params), dealFetchParams(_objectSpread(_objectSpread(_objectSpread({}, res1), res2), params))), {}, {
|
|
258
|
+
showFull: showFull
|
|
259
|
+
}));
|
|
260
|
+
case 8:
|
|
261
|
+
res = _context6.sent;
|
|
262
|
+
return _context6.abrupt("return", res);
|
|
263
|
+
case 10:
|
|
264
|
+
case "end":
|
|
265
|
+
return _context6.stop();
|
|
266
|
+
}
|
|
267
|
+
}, _callee6);
|
|
268
|
+
}));
|
|
269
|
+
return function propsRequest(_x2) {
|
|
270
|
+
return _ref5.apply(this, arguments);
|
|
271
|
+
};
|
|
272
|
+
}();
|
|
241
273
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
242
274
|
className: !searchDrawer ? 'page_plustable__body' : 'page_plustable__body turn-left'
|
|
243
275
|
}, /*#__PURE__*/_react.default.createElement(_proComponents.ProTable, _extends({}, otherProps, {
|
|
@@ -278,8 +310,8 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
278
310
|
}, "\u67E5\u8BE2"), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
279
311
|
type: "default",
|
|
280
312
|
onClick: function onClick() {
|
|
281
|
-
var _drawFormRef$
|
|
282
|
-
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$
|
|
313
|
+
var _drawFormRef$current3;
|
|
314
|
+
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current3 = drawFormRef.current) === null || _drawFormRef$current3 === void 0 ? void 0 : _drawFormRef$current3.resetFields();
|
|
283
315
|
actionRef.current.reset();
|
|
284
316
|
actionRef.current.reload();
|
|
285
317
|
},
|
|
@@ -287,21 +319,21 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
287
319
|
}, "\u91CD\u7F6E"),, columns.filter(function (item) {
|
|
288
320
|
return item.search !== false;
|
|
289
321
|
}).length > 3 ? /*#__PURE__*/_react.default.createElement("a", {
|
|
290
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
291
|
-
var _drawFormRef$
|
|
292
|
-
return _regeneratorRuntime().wrap(function
|
|
293
|
-
while (1) switch (
|
|
322
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
323
|
+
var _drawFormRef$current4, _searchRef$current4;
|
|
324
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
325
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
294
326
|
case 0:
|
|
295
|
-
|
|
327
|
+
_context7.next = 2;
|
|
296
328
|
return setSearchDrawer(!searchDrawer);
|
|
297
329
|
case 2:
|
|
298
330
|
// 没法实时监听数据所以这里要带过来
|
|
299
|
-
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$
|
|
331
|
+
drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current4 = drawFormRef.current) === null || _drawFormRef$current4 === void 0 ? void 0 : _drawFormRef$current4.setFieldsValue(searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.getFieldsValue());
|
|
300
332
|
case 3:
|
|
301
333
|
case "end":
|
|
302
|
-
return
|
|
334
|
+
return _context7.stop();
|
|
303
335
|
}
|
|
304
|
-
},
|
|
336
|
+
}, _callee7);
|
|
305
337
|
}))
|
|
306
338
|
}, /*#__PURE__*/_react.default.createElement(_icons.BarsOutlined, null), "\u9AD8\u7EA7\u7B5B\u9009") : null];
|
|
307
339
|
}
|
|
@@ -309,38 +341,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
309
341
|
// 根据用户自定义的配置 如果配置了列设置就有这个配置完全受控
|
|
310
342
|
,
|
|
311
343
|
columnsState: (action === null || action === void 0 ? void 0 : action.includes('columnSetting')) ? columnsState : props.columnsState,
|
|
312
|
-
request:
|
|
313
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
|
|
314
|
-
var _searchRef$current4, _drawFormRef$current4;
|
|
315
|
-
var res1, res2, res;
|
|
316
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
317
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
318
|
-
case 0:
|
|
319
|
-
_context7.next = 2;
|
|
320
|
-
return searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.getFieldsValue();
|
|
321
|
-
case 2:
|
|
322
|
-
res1 = _context7.sent;
|
|
323
|
-
_context7.next = 5;
|
|
324
|
-
return drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current4 = drawFormRef.current) === null || _drawFormRef$current4 === void 0 ? void 0 : _drawFormRef$current4.getFieldsValue();
|
|
325
|
-
case 5:
|
|
326
|
-
res2 = _context7.sent;
|
|
327
|
-
_context7.next = 8;
|
|
328
|
-
return request(_objectSpread(_objectSpread(_objectSpread({}, params), dealFetchParams(_objectSpread(_objectSpread(_objectSpread({}, res1), res2), params))), {}, {
|
|
329
|
-
showFull: showFull
|
|
330
|
-
}));
|
|
331
|
-
case 8:
|
|
332
|
-
res = _context7.sent;
|
|
333
|
-
return _context7.abrupt("return", res);
|
|
334
|
-
case 10:
|
|
335
|
-
case "end":
|
|
336
|
-
return _context7.stop();
|
|
337
|
-
}
|
|
338
|
-
}, _callee7);
|
|
339
|
-
}));
|
|
340
|
-
return function (_x2) {
|
|
341
|
-
return _ref6.apply(this, arguments);
|
|
342
|
-
};
|
|
343
|
-
}())
|
|
344
|
+
request: request ? propsRequest : undefined
|
|
344
345
|
// 同步高筛配置 只有高筛 才有特殊的配置 (baseSearch才会生效)
|
|
345
346
|
,
|
|
346
347
|
columns: (action === null || action === void 0 ? void 0 : action.includes('advancedFilter')) ? columns.map(function (item) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-table",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "@fle-ui/plus-table",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@ant-design/pro-components": "^2.7.0",
|
|
47
47
|
"dayjs": "^1.11.10"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "365fee8472448bd62f98b6f1c6d378e72a86a840"
|
|
50
50
|
}
|