wt-enjoy-link-antd-repack 4.1.77 → 4.1.78

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.
@@ -11,5 +11,6 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
11
11
  */
12
12
  orderType: 0 | 3 | 1 | 4 | 2 | 5;
13
13
  isFirstLoad: boolean;
14
+ onFetchData?: ((res: any) => any) | undefined;
14
15
  } & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
15
16
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"orderTypeSelect.d.ts","sourceRoot":"","sources":["orderTypeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AACvC,OAAO,KAAgE,MAAM,OAAO,CAAA;;IAKlF;;OAEG;;;IAGH;;OAEG;;;;AASL,wBAwDC"}
1
+ {"version":3,"file":"orderTypeSelect.d.ts","sourceRoot":"","sources":["orderTypeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AACvC,OAAO,KAAgE,MAAM,OAAO,CAAA;;IAKlF;;OAEG;;;IAGH;;OAEG;;;;;AAUL,wBA4DC"}
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["ownerId", "orderType", "noOwnerContent", "isFirstLoad"];
2
+ var _excluded = ["ownerId", "orderType", "noOwnerContent", "isFirstLoad", "onFetchData"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -27,6 +27,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
27
27
  noOwnerContent = _props$noOwnerContent === void 0 ? '请先选择货主' : _props$noOwnerContent,
28
28
  _props$isFirstLoad = props.isFirstLoad,
29
29
  isFirstLoad = _props$isFirstLoad === void 0 ? true : _props$isFirstLoad,
30
+ onFetchData = props.onFetchData,
30
31
  restProps = _objectWithoutProperties(props, _excluded);
31
32
  var _useState = useState(),
32
33
  _useState2 = _slicedToArray(_useState, 2),
@@ -58,13 +59,15 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
58
59
  if (!params.ownerId || !params.isFirstLoadSearch) return false;
59
60
  return true;
60
61
  }, []);
61
- var onFetchData = useCallback(function (res) {
62
- return res.rows.map(function (item) {
63
- return {
62
+ var isOnFetchData = useCallback(function (res) {
63
+ var baseRows = res.rows.map(function (item) {
64
+ return _objectSpread(_objectSpread({}, item), {}, {
64
65
  label: item.typeName,
65
66
  value: item.typeShort
66
- };
67
+ });
67
68
  });
69
+ if (onFetchData) return onFetchData(baseRows);
70
+ return baseRows;
68
71
  }, []);
69
72
  return /*#__PURE__*/_jsx(BiuCustomSelect, _objectSpread({
70
73
  ref: ref,
@@ -74,6 +77,6 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
74
77
  onSearch: isOnSearch,
75
78
  onReady: isOnReady,
76
79
  notFoundContent: notFoundContent,
77
- onFetchData: onFetchData
80
+ onFetchData: isOnFetchData
78
81
  }, restProps), "orderTypeSelect");
79
82
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wt-enjoy-link-antd-repack",
3
- "version": "4.1.77",
3
+ "version": "4.1.78",
4
4
  "description": "万通业务组件",
5
5
  "sideEffects": false,
6
6
  "main": "dist/esm/index.js",