@zat-design/sisyphus-react 4.0.0-beta.3 → 4.0.0-beta.4

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.
Files changed (243) hide show
  1. package/babel.config.js +7 -30
  2. package/dist/esm/index.d.ts +5 -0
  3. package/dist/esm/index.js +5 -0
  4. package/dist/esm/regExp/index.d.ts +19 -0
  5. package/dist/esm/regExp/index.js +73 -0
  6. package/dist/esm/tools/calc/index.d.ts +4 -0
  7. package/dist/esm/tools/calc/index.js +67 -0
  8. package/dist/esm/tools/dateUtils.d.ts +7 -0
  9. package/dist/esm/tools/dateUtils.js +23 -0
  10. package/dist/esm/tools/disableDate/index.d.ts +9 -0
  11. package/dist/esm/tools/disableDate/index.js +43 -0
  12. package/dist/esm/tools/disableTimeRange/index.d.ts +9 -0
  13. package/dist/esm/tools/disableTimeRange/index.js +121 -0
  14. package/dist/esm/tools/formatAmount/index.d.ts +7 -0
  15. package/dist/esm/tools/formatAmount/index.js +14 -0
  16. package/dist/esm/tools/formatPerMill/index.d.ts +7 -0
  17. package/dist/esm/tools/formatPerMill/index.js +11 -0
  18. package/dist/esm/tools/formatPercent/index.d.ts +7 -0
  19. package/dist/esm/tools/formatPercent/index.js +11 -0
  20. package/dist/esm/tools/getDataByIdCard/index.d.ts +16 -0
  21. package/dist/esm/tools/getDataByIdCard/index.js +65 -0
  22. package/dist/esm/tools/index.d.ts +12 -0
  23. package/dist/esm/tools/index.js +14 -0
  24. package/dist/esm/tools/sumAmount/index.d.ts +16 -0
  25. package/dist/esm/tools/sumAmount/index.js +40 -0
  26. package/dist/esm/tools/toChineseNum/index.d.ts +7 -0
  27. package/dist/esm/tools/toChineseNum/index.js +103 -0
  28. package/dist/esm/tools/toFixed/index.d.ts +2 -0
  29. package/dist/esm/tools/toFixed/index.js +5 -0
  30. package/dist/esm/tools/transformDataName/index.d.ts +12 -0
  31. package/dist/esm/tools/transformDataName/index.js +37 -0
  32. package/dist/esm/transforms/dateTransformer/index.d.ts +24 -0
  33. package/dist/esm/transforms/dateTransformer/index.js +67 -0
  34. package/dist/esm/transforms/index.d.ts +6 -0
  35. package/dist/esm/transforms/index.js +6 -0
  36. package/dist/esm/transforms/propTypes.d.ts +7 -0
  37. package/dist/esm/transforms/propTypes.js +1 -0
  38. package/dist/esm/transforms/transformDate/index.d.ts +21 -0
  39. package/dist/esm/transforms/transformDate/index.js +141 -0
  40. package/dist/esm/transforms/transformDatePicker/index.d.ts +12 -0
  41. package/dist/esm/transforms/transformDatePicker/index.js +24 -0
  42. package/dist/esm/transforms/transformRangePicker/index.d.ts +29 -0
  43. package/dist/esm/transforms/transformRangePicker/index.js +61 -0
  44. package/dist/esm/transforms/transformSwitch/index.d.ts +13 -0
  45. package/dist/esm/transforms/transformSwitch/index.js +35 -0
  46. package/dist/esm/transforms/utils.d.ts +2 -0
  47. package/dist/esm/transforms/utils.js +8 -0
  48. package/dist/esm/validate/index.d.ts +107 -0
  49. package/dist/esm/validate/index.js +284 -0
  50. package/es/ProAction/index.less +0 -2
  51. package/es/ProConfigProvider/index.d.ts +1 -0
  52. package/es/ProConfigProvider/index.js +4 -5
  53. package/es/ProDownload/style/index.less +0 -2
  54. package/es/ProDrawerForm/index.js +33 -29
  55. package/es/ProDrawerForm/style/index.less +0 -2
  56. package/es/ProEditLabel/style/index.less +0 -2
  57. package/es/ProEditTable/components/RcTable/DraggableTable.js +1 -1
  58. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +14 -2
  59. package/es/ProEditTable/propsType.d.ts +1 -1
  60. package/es/ProEditTable/style/index.less +2 -4
  61. package/es/ProEditTable/utils/diffOriginal.d.ts +1 -0
  62. package/es/ProEditTable/utils/diffOriginal.js +68 -1
  63. package/es/ProEnum/hooks/useEnum.js +5 -0
  64. package/es/ProEnum/style/index.less +0 -2
  65. package/es/ProForm/components/FormFooter/index.js +6 -6
  66. package/es/ProForm/components/base/DatePicker/index.js +19 -34
  67. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
  68. package/es/ProForm/components/base/TextArea/index.less +0 -2
  69. package/es/ProForm/components/base/TimePicker/style/index.less +0 -2
  70. package/es/ProForm/components/combination/Container/style/index.less +0 -2
  71. package/es/ProForm/components/combination/FormList/style/index.less +0 -2
  72. package/es/ProForm/components/combination/Group/component/ComRender.js +9 -8
  73. package/es/ProForm/components/combination/Group/hooks/index.js +17 -4
  74. package/es/ProForm/components/combination/Group/index.d.ts +8 -2
  75. package/es/ProForm/components/combination/Group/index.js +10 -16
  76. package/es/ProForm/components/combination/ProCascader/index.js +106 -52
  77. package/es/ProForm/components/combination/ProCascader/propsType.d.ts +12 -4
  78. package/es/ProForm/components/combination/ProCascader/style/index.less +1 -3
  79. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +2 -4
  80. package/es/ProForm/components/combination/ProModalSelect/index.js +38 -64
  81. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +7 -3
  82. package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -4
  83. package/es/ProForm/components/combination/ProNumberRange/style/index.less +4 -3
  84. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +0 -2
  85. package/es/ProForm/components/render/ChangedWrapper.js +2 -2
  86. package/es/ProForm/components/render/Render.js +17 -5
  87. package/es/ProForm/components/render/RenderFields.d.ts +1 -0
  88. package/es/ProForm/components/render/RenderFields.js +4 -2
  89. package/es/ProForm/components/render/propsType.d.ts +1 -0
  90. package/es/ProForm/index.d.ts +2 -2
  91. package/es/ProForm/index.js +5 -2
  92. package/es/ProForm/propsType.d.ts +2 -0
  93. package/es/ProForm/style/index.less +0 -2
  94. package/es/ProForm/utils/diffOriginal.d.ts +1 -0
  95. package/es/ProForm/utils/diffOriginal.js +66 -1
  96. package/es/ProForm/utils/index.js +1 -1
  97. package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
  98. package/es/ProForm/utils/useShouldUpdate.js +89 -3
  99. package/es/ProIcon/style/index.less +0 -2
  100. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +60 -8
  101. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +0 -2
  102. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +25 -3
  103. package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +3 -1
  104. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +0 -2
  105. package/es/ProLayout/components/Layout/Menu/index.js +4 -1
  106. package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
  107. package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
  108. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +8 -3
  109. package/es/ProLayout/components/ProCollapse/index.js +27 -3
  110. package/es/ProLayout/components/ProCollapse/style/index.less +148 -4
  111. package/es/ProLayout/components/ProFooter/style/index.less +0 -2
  112. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +0 -2
  113. package/es/ProLayout/components/ProHeader/style/index.less +0 -2
  114. package/es/ProLayout/index.d.ts +0 -11
  115. package/es/ProLayout/index.js +60 -32
  116. package/es/ProLayout/propTypes.d.ts +9 -0
  117. package/es/ProLayout/style/index.less +0 -2
  118. package/es/ProLayout/utils/index.d.ts +7 -0
  119. package/es/ProLayout/utils/index.js +30 -0
  120. package/es/ProSelect/index.less +0 -2
  121. package/es/ProSelect/utils/index.js +62 -1
  122. package/es/ProStep/components/Item/index.js +1 -2
  123. package/es/ProStep/style/index.less +0 -2
  124. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +1 -1
  125. package/es/ProTable/hooks/useAntdTable.d.ts +3 -0
  126. package/es/ProTable/hooks/useAntdTable.js +92 -64
  127. package/es/ProTable/index.d.ts +3 -7
  128. package/es/ProTable/index.js +14 -14
  129. package/es/ProTable/propsType.d.ts +3 -2
  130. package/es/ProTable/style/index.less +4 -6
  131. package/es/ProTabs/style/index.less +0 -2
  132. package/es/ProThemeTools/index.d.ts +0 -7
  133. package/es/ProThemeTools/index.js +10 -12
  134. package/es/ProThemeTools/style/index.less +0 -2
  135. package/es/ProTooltip/style/index.less +0 -2
  136. package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
  137. package/es/ProTree/style/index.less +0 -2
  138. package/es/ProTreeModal/style/index.less +0 -2
  139. package/es/ProUpload/style/index.less +0 -2
  140. package/es/ProViewer/style/index.less +0 -2
  141. package/es/style/theme/antd.less +0 -2
  142. package/jest.config.js +46 -4
  143. package/lib/ProAction/index.less +0 -2
  144. package/lib/ProConfigProvider/index.d.ts +1 -0
  145. package/lib/ProConfigProvider/index.js +4 -3
  146. package/lib/ProDownload/style/index.less +0 -2
  147. package/lib/ProDrawerForm/index.js +25 -28
  148. package/lib/ProDrawerForm/style/index.less +0 -2
  149. package/lib/ProEditLabel/style/index.less +0 -2
  150. package/lib/ProEditTable/components/RcTable/DraggableTable.js +1 -1
  151. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +10 -2
  152. package/lib/ProEditTable/propsType.d.ts +1 -1
  153. package/lib/ProEditTable/style/index.less +2 -4
  154. package/lib/ProEditTable/utils/diffOriginal.d.ts +1 -0
  155. package/lib/ProEditTable/utils/diffOriginal.js +48 -1
  156. package/lib/ProEnum/hooks/useEnum.js +3 -0
  157. package/lib/ProEnum/style/index.less +0 -2
  158. package/lib/ProForm/components/FormFooter/index.js +6 -5
  159. package/lib/ProForm/components/base/DatePicker/index.js +21 -33
  160. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
  161. package/lib/ProForm/components/base/TextArea/index.less +0 -2
  162. package/lib/ProForm/components/base/TimePicker/style/index.less +0 -2
  163. package/lib/ProForm/components/combination/Container/style/index.less +0 -2
  164. package/lib/ProForm/components/combination/FormList/style/index.less +0 -2
  165. package/lib/ProForm/components/combination/Group/component/ComRender.js +8 -7
  166. package/lib/ProForm/components/combination/Group/hooks/index.js +8 -2
  167. package/lib/ProForm/components/combination/Group/index.d.ts +8 -2
  168. package/lib/ProForm/components/combination/Group/index.js +8 -13
  169. package/lib/ProForm/components/combination/ProCascader/index.js +73 -16
  170. package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +12 -4
  171. package/lib/ProForm/components/combination/ProCascader/style/index.less +1 -3
  172. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +2 -2
  173. package/lib/ProForm/components/combination/ProModalSelect/index.js +26 -52
  174. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +7 -3
  175. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -4
  176. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +4 -3
  177. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +0 -2
  178. package/lib/ProForm/components/render/ChangedWrapper.js +2 -2
  179. package/lib/ProForm/components/render/Render.js +11 -3
  180. package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
  181. package/lib/ProForm/components/render/RenderFields.js +4 -2
  182. package/lib/ProForm/components/render/propsType.d.ts +1 -0
  183. package/lib/ProForm/index.d.ts +2 -2
  184. package/lib/ProForm/index.js +3 -1
  185. package/lib/ProForm/propsType.d.ts +2 -0
  186. package/lib/ProForm/style/index.less +0 -2
  187. package/lib/ProForm/utils/diffOriginal.d.ts +1 -0
  188. package/lib/ProForm/utils/diffOriginal.js +48 -1
  189. package/lib/ProForm/utils/index.js +1 -1
  190. package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
  191. package/lib/ProForm/utils/useShouldUpdate.js +50 -1
  192. package/lib/ProIcon/style/index.less +0 -2
  193. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +33 -4
  194. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +0 -2
  195. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +7 -2
  196. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +2 -1
  197. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +0 -2
  198. package/lib/ProLayout/components/Layout/Menu/index.js +4 -1
  199. package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
  200. package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
  201. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +8 -3
  202. package/lib/ProLayout/components/ProCollapse/index.js +27 -3
  203. package/lib/ProLayout/components/ProCollapse/style/index.less +148 -4
  204. package/lib/ProLayout/components/ProFooter/style/index.less +0 -2
  205. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +0 -2
  206. package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
  207. package/lib/ProLayout/index.d.ts +0 -11
  208. package/lib/ProLayout/index.js +51 -32
  209. package/lib/ProLayout/propTypes.d.ts +9 -0
  210. package/lib/ProLayout/style/index.less +0 -2
  211. package/lib/ProLayout/utils/index.d.ts +7 -0
  212. package/lib/ProLayout/utils/index.js +15 -0
  213. package/lib/ProSelect/index.less +0 -2
  214. package/lib/ProSelect/utils/index.js +34 -5
  215. package/lib/ProStep/components/Item/index.js +1 -2
  216. package/lib/ProStep/style/index.less +0 -2
  217. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +1 -1
  218. package/lib/ProTable/hooks/useAntdTable.d.ts +3 -0
  219. package/lib/ProTable/hooks/useAntdTable.js +71 -36
  220. package/lib/ProTable/index.d.ts +3 -7
  221. package/lib/ProTable/index.js +8 -13
  222. package/lib/ProTable/propsType.d.ts +3 -2
  223. package/lib/ProTable/style/index.less +4 -6
  224. package/lib/ProTabs/style/index.less +0 -2
  225. package/lib/ProThemeTools/index.d.ts +0 -7
  226. package/lib/ProThemeTools/index.js +5 -12
  227. package/lib/ProThemeTools/style/index.less +0 -2
  228. package/lib/ProTooltip/style/index.less +0 -2
  229. package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
  230. package/lib/ProTree/style/index.less +0 -2
  231. package/lib/ProTreeModal/style/index.less +0 -2
  232. package/lib/ProUpload/style/index.less +0 -2
  233. package/lib/ProViewer/style/index.less +0 -2
  234. package/lib/style/theme/antd.less +0 -2
  235. package/package.json +7 -6
  236. package/tests/__mocks__/fileMock.js +1 -0
  237. package/tests/__mocks__/zatUtils.js +27 -0
  238. package/tests/setup.ts +484 -0
  239. package/tests/test-utils.tsx +81 -0
  240. package/dist/index.esm.css +0 -6445
  241. package/dist/index.esm.js +0 -3
  242. package/dist/less.esm.css +0 -5871
  243. package/dist/less.esm.js +0 -3
@@ -1,14 +1,13 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
3
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
8
6
  var _excluded = ["className", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "code", "tooltip", "separator", "detailPlaceholder", "scrollFollowParent", "desensitization", "otherProps"];
9
- import { useEffect, useState, memo, useMemo } from 'react';
10
- import { Cascader, Tooltip } from 'antd';
7
+ import { useEffect, useState, memo, useMemo, useCallback } from 'react';
8
+ import { Cascader, Tooltip, message } from 'antd';
11
9
  import { omit, find as _find, isBoolean, isEqual } from 'lodash';
10
+ import { useRequest as useRequestFunc, useDeepCompareEffect } from 'ahooks';
12
11
  import { transformDataName } from "./utils/index";
13
12
  import { useProConfig } from "../../../../ProConfigProvider";
14
13
  import Input from "../../base/Input";
@@ -50,7 +49,7 @@ var getViewLabel = function getViewLabel(_ref) {
50
49
  return viewLabel;
51
50
  };
52
51
  var ProCascader = function ProCascader(props) {
53
- var _props$otherProps, _value$slice, _ref5, _defaultLabel$filter, _locale$ProAddressBar, _locale$ProAddressBar2;
52
+ var _props$otherProps, _useRequest$options3, _value$slice, _ref7, _defaultLabel$filter, _locale$ProAddressBar, _locale$ProAddressBar2;
54
53
  var _ref2 = useProConfig('ProAddressBar') || {},
55
54
  configDetailMaxLength = _ref2.detailMaxLength,
56
55
  configEnumCode = _ref2.enumCode,
@@ -113,10 +112,6 @@ var ProCascader = function ProCascader(props) {
113
112
  }
114
113
  return disabled;
115
114
  }, [disabled]);
116
- var _useRequest = _objectSpread({}, useRequest),
117
- service = _useRequest.service,
118
- _useRequest$defaultPa = _useRequest.defaultParams,
119
- defaultParams = _useRequest$defaultPa === void 0 ? {} : _useRequest$defaultPa;
120
115
  var _useState = useState([]),
121
116
  _useState2 = _slicedToArray(_useState, 2),
122
117
  serviceData = _useState2[0],
@@ -125,54 +120,112 @@ var ProCascader = function ProCascader(props) {
125
120
  _useState4 = _slicedToArray(_useState3, 2),
126
121
  defaultLabel = _useState4[0],
127
122
  setDefaultLabel = _useState4[1];
128
- var getFirstLevelOptions = /*#__PURE__*/function () {
129
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
130
- var _yield$service, data, newData, transFormData, serviceData;
131
- return _regeneratorRuntime().wrap(function _callee$(_context) {
132
- while (1) switch (_context.prev = _context.next) {
133
- case 0:
134
- _context.next = 2;
135
- return service(defaultParams);
136
- case 2:
137
- _yield$service = _context.sent;
138
- data = _yield$service.data;
139
- newData = data;
140
- if (transformResponse) {
141
- newData = transformResponse(data);
142
- }
143
- transFormData = transformDataName(newData, {
144
- label: fieldNames.label,
145
- value: fieldNames.value,
146
- children: (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'
147
- });
148
- serviceData = isAddressMode && realLevel === 2 ? filterDataSource(transFormData, level, fieldNames) : transFormData;
149
- setServiceData(serviceData);
150
- case 9:
151
- case "end":
152
- return _context.stop();
153
- }
154
- }, _callee);
155
- }));
156
- return function getFirstLevelOptions() {
157
- return _ref4.apply(this, arguments);
158
- };
159
- }();
123
+
124
+ // 默认成功处理函数
125
+ var defaultOnSuccessFun = function defaultOnSuccessFun(res) {
126
+ var _ref4 = res || {},
127
+ _ref4$status = _ref4.status,
128
+ status = _ref4$status === void 0 ? 200 : _ref4$status,
129
+ msg = _ref4.message,
130
+ data = _ref4.data;
131
+ if (status !== 200) {
132
+ message.error(msg);
133
+ return;
134
+ }
135
+ var newData = data;
136
+ if (transformResponse) {
137
+ newData = transformResponse(data);
138
+ }
139
+ var transFormData = transformDataName(newData, {
140
+ label: fieldNames.label,
141
+ value: fieldNames.value,
142
+ children: (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'
143
+ });
144
+ var serviceData = isAddressMode && realLevel === 2 ? filterDataSource(transFormData, level, fieldNames) : transFormData;
145
+ setServiceData(serviceData);
146
+ };
147
+
148
+ // 数据转换处理
149
+ var successTransformDataHandle = useCallback(function (res) {
150
+ if (transformResponse && typeof transformResponse === 'function') {
151
+ return transformResponse(res);
152
+ }
153
+ var _ref5 = res || {},
154
+ _ref5$status = _ref5.status,
155
+ status = _ref5$status === void 0 ? 200 : _ref5$status,
156
+ msg = _ref5.message,
157
+ data = _ref5.data;
158
+ if (status !== 200) {
159
+ message.error(msg);
160
+ return;
161
+ }
162
+ return data;
163
+ }, [transformResponse]);
164
+
165
+ // 使用ahooks的useRequest
166
+ var fetchFunction = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread(_objectSpread({
167
+ manual: true,
168
+ debounceWait: 300
169
+ }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
170
+ onSuccess: function onSuccess(data) {
171
+ var _useRequest$options, _useRequest$options$o, _useRequest$options2;
172
+ if (transformResponse && typeof transformResponse === 'function') {
173
+ var responseData = transformResponse(data);
174
+ var transFormData = transformDataName(responseData, {
175
+ label: fieldNames.label,
176
+ value: fieldNames.value,
177
+ children: (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'
178
+ });
179
+ var _serviceData = isAddressMode && realLevel === 2 ? filterDataSource(transFormData, level, fieldNames) : transFormData;
180
+ setServiceData(_serviceData);
181
+ } else {
182
+ defaultOnSuccessFun(data);
183
+ }
184
+ // 执行传入的onSuccess
185
+ useRequest === null || useRequest === void 0 || (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 || (_useRequest$options$o = _useRequest$options.onSuccess) === null || _useRequest$options$o === void 0 || _useRequest$options$o.call(_useRequest$options, data, useRequest === null || useRequest === void 0 || (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 ? void 0 : _useRequest$options2.defaultParams);
186
+ }
187
+ }));
188
+
189
+ // 缓存数据处理
190
+ var cacheList = useRequest !== null && useRequest !== void 0 && (_useRequest$options3 = useRequest.options) !== null && _useRequest$options3 !== void 0 && _useRequest$options3.cacheKey ? successTransformDataHandle(fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.data) : [];
160
191
 
161
192
  // 提取出来默认每次都执行
162
193
  if (transformResponse) {
163
194
  realDataSource = transformResponse(realDataSource);
164
195
  }
165
- useEffect(function () {
166
- if (service) {
167
- // 传入useRequest时,初次加载级联第一级数据源
168
- getFirstLevelOptions();
196
+
197
+ // 设置缓存数据
198
+ useDeepCompareEffect(function () {
199
+ var _useRequest$options4;
200
+ if (!(serviceData !== null && serviceData !== void 0 && serviceData.length) && useRequest !== null && useRequest !== void 0 && (_useRequest$options4 = useRequest.options) !== null && _useRequest$options4 !== void 0 && _useRequest$options4.cacheKey) {
201
+ if (cacheList !== null && cacheList !== void 0 && cacheList.length) {
202
+ setServiceData(cacheList);
203
+ }
204
+ }
205
+ }, [fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.data]);
206
+
207
+ // 初始化请求数据
208
+ useDeepCompareEffect(function () {
209
+ var _useRequest$options5;
210
+ if (!(useRequest !== null && useRequest !== void 0 && useRequest.service)) {
211
+ return;
169
212
  }
170
- }, [service]);
213
+ var _ref6 = (useRequest === null || useRequest === void 0 ? void 0 : useRequest.options) || {},
214
+ manual = _ref6.manual;
215
+ if (manual || cacheList !== null && cacheList !== void 0 && cacheList.length) {
216
+ return;
217
+ }
218
+
219
+ // 向后兼容性:优先使用 options.defaultParams,fallback 到 useRequest.defaultParams
220
+ var defaultParams = (useRequest === null || useRequest === void 0 || (_useRequest$options5 = useRequest.options) === null || _useRequest$options5 === void 0 ? void 0 : _useRequest$options5.defaultParams) || (useRequest === null || useRequest === void 0 ? void 0 : useRequest.defaultParams);
221
+ var params = Array.isArray(defaultParams) ? defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0] : defaultParams || {};
222
+ fetchFunction.run(params);
223
+ }, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
171
224
  useEffect(function () {
172
225
  if (realIsView && value) {
173
226
  var _realDataSource;
174
227
  // 传入dataSource + 查看时初始化展示
175
- if (service) {
228
+ if (useRequest !== null && useRequest !== void 0 && useRequest.service) {
176
229
  setDefaultLabel(getViewLabel({
177
230
  dataSource: serviceData,
178
231
  value: isAddressMode && hasDetail ? value === null || value === void 0 ? void 0 : value.slice(0, realLevel) : value
@@ -212,9 +265,9 @@ var ProCascader = function ProCascader(props) {
212
265
  var addressValue = isAddressMode ? value && (_value$slice = value.slice(0, realLevel)) !== null && _value$slice !== void 0 && _value$slice.some(function (item) {
213
266
  return !!item;
214
267
  }) ? value.slice(0, realLevel) : undefined : value;
215
- var viewValue = isAddressMode ? ((_ref5 = [].concat(_toConsumableArray(defaultLabel), [value === null || value === void 0 ? void 0 : value[realLevel]])) === null || _ref5 === void 0 || (_ref5 = _ref5.filter(function (item) {
268
+ var viewValue = isAddressMode ? ((_ref7 = [].concat(_toConsumableArray(defaultLabel), [value === null || value === void 0 ? void 0 : value[realLevel]])) === null || _ref7 === void 0 || (_ref7 = _ref7.filter(function (item) {
216
269
  return !!item;
217
- })) === null || _ref5 === void 0 ? void 0 : _ref5.join(separator)) || '-' : (defaultLabel === null || defaultLabel === void 0 || (_defaultLabel$filter = defaultLabel.filter(function (item) {
270
+ })) === null || _ref7 === void 0 ? void 0 : _ref7.join(separator)) || '-' : (defaultLabel === null || defaultLabel === void 0 || (_defaultLabel$filter = defaultLabel.filter(function (item) {
218
271
  return !!item;
219
272
  })) === null || _defaultLabel$filter === void 0 ? void 0 : _defaultLabel$filter.join(separator)) || '-';
220
273
  var findSelectedOptions = function findSelectedOptions(options, value) {
@@ -247,8 +300,8 @@ var ProCascader = function ProCascader(props) {
247
300
  return null;
248
301
  };
249
302
  var _selectedOptions = useMemo(function () {
250
- return findSelectedOptions(service ? serviceData : realDataSource, addressValue);
251
- }, [service, serviceData, realDataSource, addressValue]);
303
+ return findSelectedOptions(useRequest !== null && useRequest !== void 0 && useRequest.service ? serviceData : realDataSource, addressValue);
304
+ }, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, serviceData, realDataSource, addressValue]);
252
305
  var handleAddressChange = function handleAddressChange(e) {
253
306
  var cascaderValue = value === null || value === void 0 ? void 0 : value.slice(0, realLevel);
254
307
  if (onChange) {
@@ -273,8 +326,9 @@ var ProCascader = function ProCascader(props) {
273
326
  className: hasDetail ? '' : 'no-detail',
274
327
  placeholder: locale === null || locale === void 0 || (_locale$ProAddressBar = locale.ProAddressBar) === null || _locale$ProAddressBar === void 0 ? void 0 : _locale$ProAddressBar.placeholder,
275
328
  value: addressValue,
276
- options: service ? serviceData : realDataSource,
329
+ options: useRequest !== null && useRequest !== void 0 && useRequest.service ? serviceData : realDataSource,
277
330
  disabled: lastDisabled[0],
331
+ loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
278
332
  displayRender: displayRender,
279
333
  showSearch: {
280
334
  filter: handlefilter,
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DefaultOptionType } from 'rc-select/lib/Select';
3
- import { Service } from 'ahooks/lib/useRequest/src/types';
3
+ import { Service, Options } from 'ahooks/lib/useRequest/src/types';
4
4
  export interface FieldNamesType {
5
5
  label: string;
6
6
  value: string;
@@ -19,10 +19,18 @@ export interface ProCascaderType {
19
19
  fieldNames?: FieldNamesType;
20
20
  dataSource?: DefaultOptionType[];
21
21
  useRequest?: {
22
- loadData?: boolean;
23
- service: Service<any, any>;
22
+ /**
23
+ * @description 请求服务函数
24
+ */
25
+ service?: Service<any, any>;
26
+ /**
27
+ * @description 请求选项
28
+ */
29
+ options?: Options<any, any>;
30
+ /**
31
+ * @deprecated 保留向后兼容性,使用 options.defaultParams 替代
32
+ */
24
33
  defaultParams?: any;
25
- parentKey?: string;
26
34
  };
27
35
  onChange?: (value: string[], selectedOptions?: any[]) => void;
28
36
  transformResponse?: (data: any[]) => any[];
@@ -1,5 +1,3 @@
1
- /* @root-entry-name: 'default'; */
2
- /* @import (reference) '~antd/es/style/themes/index.less'; */
3
1
 
4
2
  .pro-address {
5
3
  display: flex;
@@ -9,7 +7,7 @@
9
7
  width: 45%;
10
8
 
11
9
  &.no-detail {
12
- width: 100% !important;
10
+ width: 100%;
13
11
  }
14
12
  }
15
13
 
@@ -63,7 +63,7 @@ export function useRequestList(service, options, useRequestOptions) {
63
63
  queryBean: _condition !== null && _condition !== void 0 ? _condition : {}
64
64
  }) : _condition;
65
65
  return transformParams ? transformParams(tempParams) : tempParams;
66
- }, [page, searchValues]);
66
+ }, [page, searchValues, _defaultParams, transformParams]);
67
67
 
68
68
  // 调接口
69
69
  var result = useRequest(service || defaultService, _objectSpread(_objectSpread({}, useRequestOptions), {}, {
@@ -103,9 +103,7 @@ export function useRequestList(service, options, useRequestOptions) {
103
103
 
104
104
  // 重置查询条件
105
105
  var onReset = useCallback(function () {
106
- onSearch({
107
- d: Date.now()
108
- });
106
+ onSearch({});
109
107
  }, [onSearch]);
110
108
  var dataSource = useMemo(function () {
111
109
  if (data) {
@@ -5,13 +5,13 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
6
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
7
7
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
8
- var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
8
+ var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "mode", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "tooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
9
9
  _excluded2 = ["onOk"],
10
10
  _excluded3 = ["rowKey", "columns", "rowSelection"];
11
11
  import { SearchOutlined } from '@ant-design/icons';
12
12
  import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
13
13
  import { Form, message, Input, Tooltip, Space, Button, Spin } from 'antd';
14
- import { debounce, isArray, isEqual, isFunction } from 'lodash';
14
+ import { debounce, isArray, isBoolean, isEqual, isFunction, isObject } from 'lodash';
15
15
  import classNames from 'classnames';
16
16
  import { ReactSVG } from 'react-svg';
17
17
  import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
@@ -34,6 +34,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
34
34
  fieldNames = props.fieldNames,
35
35
  _props$readOnly = props.readOnly,
36
36
  readOnly = _props$readOnly === void 0 ? true : _props$readOnly,
37
+ _props$mode = props.mode,
38
+ mode = _props$mode === void 0 ? 'select' : _props$mode,
37
39
  addonAfter = props.addonAfter,
38
40
  configOption = props.configOption,
39
41
  title = props.title,
@@ -46,11 +48,19 @@ var ProModalSelect = function ProModalSelect(props, ref) {
46
48
  beforeOpen = props.beforeOpen,
47
49
  afterOpen = props.afterOpen,
48
50
  isTooltip = props.isTooltip,
51
+ tooltip = props.tooltip,
49
52
  searchForm = props.searchForm,
50
53
  searchKey = props.searchKey,
51
54
  defaultOne = props.defaultOne,
52
55
  otherProps = props.otherProps,
53
56
  restProps = _objectWithoutProperties(props, _excluded);
57
+ var _tooltip = tooltip !== null && tooltip !== void 0 ? tooltip : isTooltip;
58
+ var nextMode = useMemo(function () {
59
+ if (isBoolean(readOnly) && readOnly === false) {
60
+ return 'input';
61
+ }
62
+ return mode;
63
+ }, [mode, readOnly]);
54
64
  var contentForm = Form.useFormInstance();
55
65
  if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
56
66
  throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
@@ -160,8 +170,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
160
170
  transformParams: transformParams,
161
171
  transformResponse: transformResponse
162
172
  }, _objectSpread({
163
- manual: true,
164
- ready: (initParams || defaultOne) && !readOnly || open
173
+ ready: (initParams || defaultOne) && nextMode === 'input' || open
165
174
  }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options)),
166
175
  data = _useRequestList2.data,
167
176
  loading = _useRequestList2.loading,
@@ -193,7 +202,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
193
202
  if (typeof data === 'string' || typeof data === 'number') {
194
203
  return data;
195
204
  }
196
- if (Object.prototype.toString.call(data) === '[object Object]') {
205
+ if (isObject(data)) {
197
206
  return handleFormat(_objectSpread(_objectSpread({}, data), {}, {
198
207
  value: data[valueKey],
199
208
  label: data[labelKey]
@@ -231,7 +240,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
231
240
  * @returns {any}
232
241
  */
233
242
  var getRowKey = function getRowKey(record) {
234
- if (typeof rowKey === 'function') {
243
+ if (isFunction(rowKey)) {
235
244
  return rowKey(record);
236
245
  }
237
246
  return record[rowKey];
@@ -254,7 +263,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
254
263
  var handleChangeValue = function handleChangeValue(e) {
255
264
  onChange(e.target.value);
256
265
  preValue.current = e.target.value;
257
- if (!readOnly) {
266
+ if (nextMode === 'input') {
258
267
  setState({
259
268
  _value: e.target.value
260
269
  });
@@ -515,7 +524,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
515
524
  selectedRows: list,
516
525
  selectedRowKeys: nextSelectRowKeys
517
526
  });
518
- } else if (!readOnly) {
527
+ } else if (nextMode === 'input') {
519
528
  // 当传入initParams且文本框非只读时,不调用接口获取初始化数据
520
529
  setState({
521
530
  _value: value,
@@ -604,13 +613,13 @@ var ProModalSelect = function ProModalSelect(props, ref) {
604
613
  selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || [],
605
614
  _value: undefined
606
615
  });
607
- } else if (Object.prototype.toString.call(value) === '[object Array]') {
616
+ } else if (isArray(value)) {
608
617
  setState({
609
618
  selectedRowKeys: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || value,
610
619
  selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || value,
611
620
  _value: value
612
621
  });
613
- } else if (Object.prototype.toString.call(value) === '[object Object]') {
622
+ } else if (isObject(value)) {
614
623
  var initialValue = _defineProperty(_defineProperty({}, valueKey, value[valueKey]), labelKey, value[labelKey]);
615
624
  setState({
616
625
  selectedRowKeys: [value],
@@ -633,7 +642,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
633
642
  nextState.selectedRowKeys = [];
634
643
  nextState.selectedRows = [];
635
644
  }
636
- if (Object.prototype.toString.call(value) === '[object Object]') {
645
+ if (isObject(value)) {
637
646
  nextState.selectedRowKeys = [getRowKey(value)];
638
647
  nextState.selectedRows = [value];
639
648
  }
@@ -659,12 +668,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
659
668
  hideTooltipIfOpen(fieldRef.current, open);
660
669
  }, [open]);
661
670
  useEffect(function () {
662
- if (value && !open && isInit && !readOnly) {
671
+ if (value && !open && isInit && nextMode === 'input') {
663
672
  getInitValues();
664
673
  }
665
674
  }, [JSON.stringify(value), open, isInit]);
666
675
  useDebounceEffect(function () {
667
- if (value && !open && readOnly && (!isEqual(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
676
+ if (value && !open && nextMode === 'select' && (!isEqual(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
668
677
  var _options$some;
669
678
  preValue.current = value;
670
679
  var _data3 = labelInValue ? value[valueKey] : value;
@@ -731,7 +740,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
731
740
  });
732
741
  }
733
742
  }
734
- if (!readOnly) {
743
+ if (nextMode === 'input') {
735
744
  if (labelInValue && _value && !isEqual(value, _value)) {
736
745
  setState({
737
746
  _value: value,
@@ -755,7 +764,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
755
764
  width: '100%'
756
765
  },
757
766
  block: true,
758
- children: [readOnly ? /*#__PURE__*/_jsx(ProSelect, _objectSpread({
767
+ children: [nextMode === 'select' ? /*#__PURE__*/_jsx(ProSelect, _objectSpread({
759
768
  value: value,
760
769
  onChange: handleSelectValue,
761
770
  disabled: disabled,
@@ -771,16 +780,21 @@ var ProModalSelect = function ProModalSelect(props, ref) {
771
780
  }) : null,
772
781
  onFocus: handleSelectFocus,
773
782
  onSearch: handleSelectSearch,
783
+ tooltip: _tooltip,
774
784
  style: {
775
785
  width: isView || disabled ? '100%' : 'calc(100% - 30px)'
776
786
  }
777
- }, restProps)) : /*#__PURE__*/_jsx(Input, _objectSpread({
778
- value: viewText,
779
- onChange: handleChangeValue,
780
- disabled: disabled,
781
- autoComplete: "off",
782
- allowClear: true
783
- }, restProps)), isView || disabled ? null : /*#__PURE__*/_jsx(Button, {
787
+ }, restProps)) : /*#__PURE__*/_jsx(Tooltip, {
788
+ title: _tooltip ? viewText : null,
789
+ placement: "topLeft",
790
+ children: /*#__PURE__*/_jsx(Input, _objectSpread({
791
+ value: viewText,
792
+ onChange: handleChangeValue,
793
+ disabled: disabled,
794
+ autoComplete: "off",
795
+ allowClear: true
796
+ }, restProps))
797
+ }), isView || disabled ? null : /*#__PURE__*/_jsx(Button, {
784
798
  onClick: handleClick,
785
799
  icon: /*#__PURE__*/_jsx(ReactSVG, {
786
800
  className: "viewSvg",
@@ -795,41 +809,6 @@ var ProModalSelect = function ProModalSelect(props, ref) {
795
809
  children: customRender
796
810
  });
797
811
  }
798
- useDeepCompareEffect(function () {
799
- if (isTooltip && value) {
800
- var dom = document.getElementById(uuid);
801
- dom.addEventListener('mouseover', function (e) {
802
- if (value && e.target.tagName === 'INPUT') {
803
- setState({
804
- open: true
805
- });
806
- }
807
- });
808
- dom.addEventListener('mouseout', function (e) {
809
- if (e.target.tagName === 'INPUT') {
810
- setState({
811
- open: false
812
- });
813
- }
814
- });
815
- return function () {
816
- dom.removeEventListener('mouseover', function (e) {
817
- if (value && e.target.tagName === 'INPUT') {
818
- setState({
819
- open: true
820
- });
821
- }
822
- });
823
- dom.removeEventListener('mouseout', function (e) {
824
- if (e.target.tagName === 'INPUT') {
825
- setState({
826
- open: false
827
- });
828
- }
829
- });
830
- };
831
- }
832
- }, [value, isTooltip]);
833
812
  useDeepCompareEffect(function () {
834
813
  setState({
835
814
  options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || []
@@ -868,14 +847,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
868
847
  className: _className,
869
848
  style: style,
870
849
  ref: fieldRef,
871
- children: isTooltip && viewText ? /*#__PURE__*/_jsx(Tooltip, {
872
- placement: "topLeft",
873
- open: open,
874
- title: viewText,
875
- children: initRender
876
- }) : initRender
850
+ children: initRender
877
851
  }), /*#__PURE__*/_jsxs(ProDrawerForm, _objectSpread(_objectSpread({
878
- showType: "Modal",
852
+ mode: "Modal",
879
853
  title: title,
880
854
  onOk: handleFinish
881
855
  // @ts-ignore
@@ -80,17 +80,21 @@ interface ProModalPropsType {
80
80
  beforeOpen?: any;
81
81
  /** 打开弹框后的回调函数 */
82
82
  afterOpen?: any;
83
- /** 是否启用tooltip提示 */
83
+ /** 废弃 是否启用tooltip提示 */
84
84
  isTooltip?: boolean;
85
+ /** 是否启用tooltip提示 */
86
+ tooltip?: boolean;
85
87
  /** 是否以"值-名称"形式展示 */
86
88
  showCodeName?: boolean;
87
89
  /** 查询表单实例,用于获取查询表单数据 */
88
90
  searchForm?: FormInstance;
89
91
  /** 模糊查询的字段名 */
90
92
  searchKey?: string;
93
+ /** 展示形式 */
94
+ mode?: 'input' | 'select';
91
95
  }
92
96
  /** 模态框选择器属性类型(结合Select和Input属性) */
93
- export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalPropsType;
97
+ export declare type ProModalSelectPropsType = Omit<SelectProps & InputProps, 'mode'> & ProModalPropsType;
94
98
  /** 配置选项类型 */
95
99
  export type ProModalSelectConfigType = ConfigOption;
96
100
  /** 模态框属性类型 */
@@ -98,5 +102,5 @@ export type ProModalType = Omit<ProModalPropsType, 'configOption'> & {
98
102
  configOption: ProModalSelectConfigType;
99
103
  };
100
104
  /** 模态框选择器类型(结合Select和Input属性) */
101
- export type ProModalSelectType = SelectProps & InputProps & ProModalType;
105
+ export type ProModalSelectType = Omit<SelectProps & InputProps, 'mode'> & ProModalType;
102
106
  export {};
@@ -1,5 +1,3 @@
1
- /* @root-entry-name: 'default'; */
2
- /* @import (reference) '~antd/es/style/themes/index.less'; */
3
1
 
4
2
  .pro-modal-select,
5
3
  .pro-tree-modal {
@@ -53,7 +51,7 @@
53
51
  }
54
52
  }
55
53
 
56
- // 新加适用于 readonly false
54
+ // 新加适用于 _readOnly false
57
55
  .@{ant-prefix}-input-affix-wrapper {
58
56
  border-top-right-radius: 0;
59
57
  border-bottom-right-radius: 0;
@@ -102,7 +100,6 @@
102
100
  }
103
101
  }
104
102
 
105
-
106
103
  .@{ant-prefix}-input-group-wrapper-status-error {
107
104
  &:hover {
108
105
  .@{ant-prefix}-input,
@@ -1,7 +1,8 @@
1
- /* @root-entry-name: 'default'; */
2
- /* @import (reference) '~antd/es/style/themes/index.less'; */
3
-
4
1
  .pro-number-range {
2
+ display: block;
3
+ .@{ant-prefix}-space-compact {
4
+ display: block;
5
+ }
5
6
  .range-split {
6
7
  min-width: 32px;
7
8
  max-width: 32px;
@@ -1,5 +1,3 @@
1
- /* @root-entry-name: 'default'; */
2
- /* @import (reference) '~antd/es/style/themes/index.less'; */
3
1
 
4
2
  .@{ant-prefix}-form-item-has-error {
5
3
  .@{ant-prefix}-picker-status-error
@@ -58,8 +58,8 @@ var ChangedWrapper = function ChangedWrapper(props) {
58
58
  value: _value,
59
59
  originalValue: _originalValue,
60
60
  form: form,
61
- onDiff: onDiff
62
- // name: namesStr || name,
61
+ onDiff: onDiff,
62
+ type: props.type
63
63
  });
64
64
  }, [isWatch, noChange, props[valuePropName], originalValue, _typeof(onDiff)]);
65
65
  var isAdd = diffType === 'add';