ds-web-all 1.0.1-beta.91 → 1.0.1-beta.93

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.
@@ -98,10 +98,7 @@ var ComposeManage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
98
98
  emptyText = _ref$emptyText === void 0 ? '暂无数据' : _ref$emptyText,
99
99
  _ref$staticDataSource = _ref.staticDataSource,
100
100
  staticDataSource = _ref$staticDataSource === void 0 ? [] : _ref$staticDataSource,
101
- _ref$staticFilter = _ref.staticFilter,
102
- staticFilter = _ref$staticFilter === void 0 ? function () {
103
- return true;
104
- } : _ref$staticFilter,
101
+ staticFilter = _ref.staticFilter,
105
102
  _ref$staticSearch = _ref.staticSearch,
106
103
  staticSearch = _ref$staticSearch === void 0 ? function () {} : _ref$staticSearch,
107
104
  _ref$outerLoading = _ref.outerLoading,
@@ -359,6 +356,7 @@ var ComposeManage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
359
356
  // 执行查询的逻辑;
360
357
  var handleSearch = function handleSearch() {
361
358
  var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
359
+ var isSetField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
362
360
  filterProps === null || filterProps === void 0 ? void 0 : filterProps.map(function (item) {
363
361
  if (item.type === 'datepicker') {
364
362
  values[item.name] = values[item.name] ? (0, _dayjs.default)(values[item.name]).format(item.props._format) : undefined;
@@ -389,6 +387,9 @@ var ComposeManage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
389
387
  }
390
388
  setPageNo(1);
391
389
  setSearch(newSearch);
390
+ if (isSetField && formRef.current) {
391
+ formRef.current.setFieldsValue(newSearch);
392
+ }
392
393
  if (isCacheListFilter) {
393
394
  var _window$history$state22;
394
395
  window.history.replaceState(_objectSpread(_objectSpread({}, (_window$history$state22 = window.history.state) !== null && _window$history$state22 !== void 0 ? _window$history$state22 : {}), {}, {
@@ -646,7 +647,7 @@ var ComposeManage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
646
647
  return staticFilter(search, el, i);
647
648
  });
648
649
  setTableSource(_toConsumableArray(newData));
649
- setTotal(newData.length);
650
+ setTotal(newTotal !== null && newTotal !== void 0 ? newTotal : newData.length);
650
651
  } else {
651
652
  setTableSource(dataSorce);
652
653
  setTotal(newTotal !== null && newTotal !== void 0 ? newTotal : dataSorce.length);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "ds-web-all",
4
- "version": "1.0.1-beta.91",
4
+ "version": "1.0.1-beta.93",
5
5
  "scripts": {
6
6
  "start": "cross-env BUILD_ENV=dev && dumi dev",
7
7
  "docs:build": "cross-env BUILD_ENV=production && dumi build",