@fle-ui/plus-table 1.2.2 → 1.2.3

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.
@@ -21,22 +21,21 @@
21
21
  display: flex;
22
22
  flex-direction: row;
23
23
  .ant-form-item-label {
24
- width: 84px;
24
+ width: 86px;
25
25
  line-height: 34px;
26
- margin-right: 8px;
27
26
  text-align: right;
28
27
  label {
29
- font-size: 14px;
28
+ font-size: 12px;
30
29
  }
31
30
  }
32
31
  .ant-form-item-control {
33
- width: 230px;
32
+ width: 240px;
34
33
  .ant-form-item-control-input {
35
- width: 230px;
34
+ width: 240px;
36
35
  }
37
36
  .ant-picker {
38
- min-width: 230px !important;
39
- width: 230px;
37
+ min-width: 240px !important;
38
+ width: 240px;
40
39
  }
41
40
  }
42
41
  }
package/es/index.js CHANGED
@@ -33,7 +33,7 @@ import FormRender from './FormSearch/index';
33
33
  import { BarsOutlined } from '@ant-design/icons';
34
34
  import './FormSearch/index.less';
35
35
  var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
36
- var _otherProps$scroll, _otherProps$scroll2;
36
+ var _otherProps$scroll;
37
37
  var mode = props.mode,
38
38
  columns = props.columns,
39
39
  _props$hasShowFull = props.hasShowFull,
@@ -111,7 +111,6 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
111
111
  });
112
112
  var handleOnChangeColumn = function handleOnChangeColumn(map) {
113
113
  // 列设置更新
114
- debugger;
115
114
  setColumnsStateMap(map);
116
115
  };
117
116
  var handleSave = /*#__PURE__*/function () {
@@ -179,13 +178,13 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
179
178
  return (_props$fetchSetting2 = props.fetchSetting) === null || _props$fetchSetting2 === void 0 ? void 0 : _props$fetchSetting2.call(props);
180
179
  case 3:
181
180
  res = _context4.sent;
182
- // debugger;
183
181
  // show?: boolean;
184
182
  // fixed?: 'right' | 'left' | undefined;
185
183
  // order?: number;
186
184
  // disable?: boolean | {
187
185
  // checkbox: boolean;
188
186
  // };
187
+ // console.log(res);
189
188
  setColumnsStateContainId(res);
190
189
  setColumnsStateMap(res);
191
190
  case 6:
@@ -200,7 +199,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
200
199
  }();
201
200
  var onValuesChange = function onValuesChange(changeValue, allValue) {
202
201
  var _searchRef$current2;
203
- searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.setFieldValue(drawFormRef.current.getFieldsValue());
202
+ searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.setFieldsValue(drawFormRef.current.getFieldsValue());
204
203
  };
205
204
  var onTableChange = function onTableChange(pagination) {
206
205
  // 劫持分页改动
@@ -280,15 +279,14 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
280
279
  };
281
280
  }();
282
281
  return /*#__PURE__*/React.createElement("div", {
283
- className: !searchDrawer ? 'page_plustable__body' : 'page_plustable__body turn-left'
282
+ className: "page_plustable__body"
284
283
  }, /*#__PURE__*/React.createElement(ProTable, _extends({}, otherProps, {
285
284
  // 公共配置 大家都有的
286
285
  pagination: pagination,
287
286
  actionRef: actionRef,
288
287
  formRef: searchRef,
289
288
  scroll: {
290
- y: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.y) || document.documentElement.clientHeight - 355,
291
- x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll2 = otherProps.scroll) === null || _otherProps$scroll2 === void 0 ? void 0 : _otherProps$scroll2.x) || 1300
289
+ x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.x) || 1300
292
290
  }
293
291
  // 根据用户自定义的配置 如果配置了高级筛选就有这个配置
294
292
  ,
@@ -310,13 +308,14 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
310
308
  },
311
309
  optionRender: function optionRender(searchConfig) {
312
310
  return [/*#__PURE__*/React.createElement(_Button, {
311
+ key: "1",
313
312
  size: "middle",
314
313
  type: "primary",
315
- ghost: true,
316
314
  onClick: function onClick() {
317
315
  handleSearchAll(searchConfig);
318
316
  }
319
317
  }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(_Button, {
318
+ key: "2",
320
319
  type: "default",
321
320
  onClick: function onClick() {
322
321
  var _drawFormRef$current3;
@@ -325,9 +324,10 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
325
324
  actionRef.current.reload();
326
325
  },
327
326
  size: "middle"
328
- }, "\u91CD\u7F6E"),, columns.filter(function (item) {
327
+ }, "\u91CD\u7F6E"), columns.filter(function (item) {
329
328
  return item.search !== false;
330
329
  }).length > 3 ? /*#__PURE__*/React.createElement("a", {
330
+ key: "3",
331
331
  onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
332
332
  var _drawFormRef$current4, _searchRef$current4;
333
333
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
@@ -358,7 +358,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
358
358
  if (item.baseSearch) {
359
359
  return _objectSpread(_objectSpread({}, item), {}, {
360
360
  search: item.search,
361
- fieldProps: {
361
+ fieldProps: _objectSpread({
362
362
  onChange: function onChange(e) {
363
363
  if (e) {
364
364
  var _drawFormRef$current5;
@@ -368,7 +368,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
368
368
  drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current7 = drawFormRef.current) === null || _drawFormRef$current7 === void 0 ? void 0 : _drawFormRef$current7.resetFields([item.dataIndex]);
369
369
  }
370
370
  }
371
- }
371
+ }, item.fieldProps)
372
372
  });
373
373
  }
374
374
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -410,7 +410,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
410
410
  width: 380,
411
411
  rootStyle: {
412
412
  position: 'fixed',
413
- top: props.top || 0
413
+ top: props.top || 92
414
414
  },
415
415
  getContainer: (otherProps === null || otherProps === void 0 ? void 0 : otherProps.getContainer) || document.getElementsByTagName('body')[0],
416
416
  className: "search-drawer",
@@ -435,8 +435,34 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
435
435
  },
436
436
  form: {},
437
437
  search: {
438
- optionRender: function optionRender() {
439
- return [];
438
+ optionRender: function optionRender(searchConfig) {
439
+ return [/*#__PURE__*/React.createElement("div", {
440
+ style: {
441
+ position: 'fixed',
442
+ bottom: 0,
443
+ display: 'flex',
444
+ width: '380px',
445
+ right: '0',
446
+ justifyContent: 'space-around',
447
+ padding: "16px",
448
+ boxSizing: 'border-box'
449
+ }
450
+ }, /*#__PURE__*/React.createElement(_Button, {
451
+ size: "middle",
452
+ type: "primary",
453
+ onClick: function onClick() {
454
+ handleSearchAll(searchConfig);
455
+ }
456
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(_Button, {
457
+ type: "default",
458
+ onClick: function onClick() {
459
+ var _drawFormRef$current8;
460
+ drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current8 = drawFormRef.current) === null || _drawFormRef$current8 === void 0 ? void 0 : _drawFormRef$current8.resetFields();
461
+ actionRef.current.reset();
462
+ actionRef.current.reload();
463
+ },
464
+ size: "middle"
465
+ }, "\u91CD\u7F6E"))];
440
466
  },
441
467
  collapsed: false,
442
468
  collapseRender: function collapseRender() {
@@ -21,22 +21,21 @@
21
21
  display: flex;
22
22
  flex-direction: row;
23
23
  .ant-form-item-label {
24
- width: 84px;
24
+ width: 86px;
25
25
  line-height: 34px;
26
- margin-right: 8px;
27
26
  text-align: right;
28
27
  label {
29
- font-size: 14px;
28
+ font-size: 12px;
30
29
  }
31
30
  }
32
31
  .ant-form-item-control {
33
- width: 230px;
32
+ width: 240px;
34
33
  .ant-form-item-control-input {
35
- width: 230px;
34
+ width: 240px;
36
35
  }
37
36
  .ant-picker {
38
- min-width: 230px !important;
39
- width: 230px;
37
+ min-width: 240px !important;
38
+ width: 240px;
40
39
  }
41
40
  }
42
41
  }
package/lib/index.js CHANGED
@@ -33,7 +33,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
33
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
34
34
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
35
35
  var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
36
- var _otherProps$scroll, _otherProps$scroll2;
36
+ var _otherProps$scroll;
37
37
  var mode = props.mode,
38
38
  columns = props.columns,
39
39
  _props$hasShowFull = props.hasShowFull,
@@ -111,7 +111,6 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
111
111
  });
112
112
  var handleOnChangeColumn = function handleOnChangeColumn(map) {
113
113
  // 列设置更新
114
- debugger;
115
114
  setColumnsStateMap(map);
116
115
  };
117
116
  var handleSave = /*#__PURE__*/function () {
@@ -179,13 +178,13 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
179
178
  return (_props$fetchSetting2 = props.fetchSetting) === null || _props$fetchSetting2 === void 0 ? void 0 : _props$fetchSetting2.call(props);
180
179
  case 3:
181
180
  res = _context4.sent;
182
- // debugger;
183
181
  // show?: boolean;
184
182
  // fixed?: 'right' | 'left' | undefined;
185
183
  // order?: number;
186
184
  // disable?: boolean | {
187
185
  // checkbox: boolean;
188
186
  // };
187
+ // console.log(res);
189
188
  setColumnsStateContainId(res);
190
189
  setColumnsStateMap(res);
191
190
  case 6:
@@ -200,7 +199,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
200
199
  }();
201
200
  var onValuesChange = function onValuesChange(changeValue, allValue) {
202
201
  var _searchRef$current2;
203
- searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.setFieldValue(drawFormRef.current.getFieldsValue());
202
+ searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.setFieldsValue(drawFormRef.current.getFieldsValue());
204
203
  };
205
204
  var onTableChange = function onTableChange(pagination) {
206
205
  // 劫持分页改动
@@ -280,15 +279,14 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
280
279
  };
281
280
  }();
282
281
  return /*#__PURE__*/_react.default.createElement("div", {
283
- className: !searchDrawer ? 'page_plustable__body' : 'page_plustable__body turn-left'
282
+ className: "page_plustable__body"
284
283
  }, /*#__PURE__*/_react.default.createElement(_proComponents.ProTable, _extends({}, otherProps, {
285
284
  // 公共配置 大家都有的
286
285
  pagination: pagination,
287
286
  actionRef: actionRef,
288
287
  formRef: searchRef,
289
288
  scroll: {
290
- y: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.y) || document.documentElement.clientHeight - 355,
291
- x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll2 = otherProps.scroll) === null || _otherProps$scroll2 === void 0 ? void 0 : _otherProps$scroll2.x) || 1300
289
+ x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.x) || 1300
292
290
  }
293
291
  // 根据用户自定义的配置 如果配置了高级筛选就有这个配置
294
292
  ,
@@ -310,13 +308,14 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
310
308
  },
311
309
  optionRender: function optionRender(searchConfig) {
312
310
  return [/*#__PURE__*/_react.default.createElement(_antd.Button, {
311
+ key: "1",
313
312
  size: "middle",
314
313
  type: "primary",
315
- ghost: true,
316
314
  onClick: function onClick() {
317
315
  handleSearchAll(searchConfig);
318
316
  }
319
317
  }, "\u67E5\u8BE2"), /*#__PURE__*/_react.default.createElement(_antd.Button, {
318
+ key: "2",
320
319
  type: "default",
321
320
  onClick: function onClick() {
322
321
  var _drawFormRef$current3;
@@ -325,9 +324,10 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
325
324
  actionRef.current.reload();
326
325
  },
327
326
  size: "middle"
328
- }, "\u91CD\u7F6E"),, columns.filter(function (item) {
327
+ }, "\u91CD\u7F6E"), columns.filter(function (item) {
329
328
  return item.search !== false;
330
329
  }).length > 3 ? /*#__PURE__*/_react.default.createElement("a", {
330
+ key: "3",
331
331
  onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
332
332
  var _drawFormRef$current4, _searchRef$current4;
333
333
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
@@ -358,7 +358,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
358
358
  if (item.baseSearch) {
359
359
  return _objectSpread(_objectSpread({}, item), {}, {
360
360
  search: item.search,
361
- fieldProps: {
361
+ fieldProps: _objectSpread({
362
362
  onChange: function onChange(e) {
363
363
  if (e) {
364
364
  var _drawFormRef$current5;
@@ -368,7 +368,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
368
368
  drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current7 = drawFormRef.current) === null || _drawFormRef$current7 === void 0 ? void 0 : _drawFormRef$current7.resetFields([item.dataIndex]);
369
369
  }
370
370
  }
371
- }
371
+ }, item.fieldProps)
372
372
  });
373
373
  }
374
374
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -410,7 +410,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
410
410
  width: 380,
411
411
  rootStyle: {
412
412
  position: 'fixed',
413
- top: props.top || 0
413
+ top: props.top || 92
414
414
  },
415
415
  getContainer: (otherProps === null || otherProps === void 0 ? void 0 : otherProps.getContainer) || document.getElementsByTagName('body')[0],
416
416
  className: "search-drawer",
@@ -435,8 +435,34 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
435
435
  },
436
436
  form: {},
437
437
  search: {
438
- optionRender: function optionRender() {
439
- return [];
438
+ optionRender: function optionRender(searchConfig) {
439
+ return [/*#__PURE__*/_react.default.createElement("div", {
440
+ style: {
441
+ position: 'fixed',
442
+ bottom: 0,
443
+ display: 'flex',
444
+ width: '380px',
445
+ right: '0',
446
+ justifyContent: 'space-around',
447
+ padding: "16px",
448
+ boxSizing: 'border-box'
449
+ }
450
+ }, /*#__PURE__*/_react.default.createElement(_antd.Button, {
451
+ size: "middle",
452
+ type: "primary",
453
+ onClick: function onClick() {
454
+ handleSearchAll(searchConfig);
455
+ }
456
+ }, "\u67E5\u8BE2"), /*#__PURE__*/_react.default.createElement(_antd.Button, {
457
+ type: "default",
458
+ onClick: function onClick() {
459
+ var _drawFormRef$current8;
460
+ drawFormRef === null || drawFormRef === void 0 ? void 0 : (_drawFormRef$current8 = drawFormRef.current) === null || _drawFormRef$current8 === void 0 ? void 0 : _drawFormRef$current8.resetFields();
461
+ actionRef.current.reset();
462
+ actionRef.current.reload();
463
+ },
464
+ size: "middle"
465
+ }, "\u91CD\u7F6E"))];
440
466
  },
441
467
  collapsed: false,
442
468
  collapseRender: function collapseRender() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fle-ui/plus-table",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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": "6ee42fd7fb69ac3582da27500dcb9a5b30f70665"
49
+ "gitHead": "5689cb1baefe9cc57fe1e750dc2d44826ef6329d"
50
50
  }