@zat-design/sisyphus-react 3.7.3 → 3.8.0-beat.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.
Files changed (229) hide show
  1. package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
  2. package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
  3. package/coverage/lcov-report/src/.umi/core/index.html +206 -0
  4. package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
  5. package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
  6. package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
  7. package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
  8. package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
  9. package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
  10. package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
  11. package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
  12. package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
  13. package/coverage/lcov-report/src/.umi/index.html +116 -0
  14. package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
  15. package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
  16. package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
  17. package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
  18. package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
  19. package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
  20. package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
  21. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
  22. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
  23. package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
  24. package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
  25. package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
  26. package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
  27. package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
  28. package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
  29. package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
  30. package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
  31. package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
  32. package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
  33. package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
  34. package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
  35. package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
  36. package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
  37. package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
  38. package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
  39. package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
  40. package/dist/index.esm.css +100 -4
  41. package/dist/less.esm.css +97 -4
  42. package/es/ProAction/index.js +1 -1
  43. package/es/ProDownload/index.js +3 -3
  44. package/es/ProDownload/utils.js +3 -3
  45. package/es/ProDrawerForm/components/ProDrawer/index.js +4 -4
  46. package/es/ProDrawerForm/components/ProModal/index.js +3 -3
  47. package/es/ProEditLabel/index.js +3 -3
  48. package/es/ProEditTable/components/ActionButton/index.js +3 -3
  49. package/es/ProEditTable/components/RenderField/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
  50. package/es/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +22 -10
  51. package/es/ProEditTable/components/RenderField/index.js +8 -8
  52. package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
  53. package/es/ProEditTable/utils/config.js +2 -2
  54. package/es/ProEditTable/utils/index.js +5 -5
  55. package/es/ProEditTable/utils/tools.js +1 -1
  56. package/es/ProEnum/components/Group.js +10 -2
  57. package/es/ProEnum/hooks/useEnumRequest.js +2 -2
  58. package/es/ProEnum/index.js +6 -5
  59. package/es/ProEnum/style/index.less +14 -4
  60. package/es/ProEnum/utils/index.d.ts +1 -1
  61. package/es/ProEnum/utils/index.js +4 -0
  62. package/es/ProForm/components/combination/Container/index.js +5 -3
  63. package/es/ProForm/components/combination/Container/propsType.d.ts +2 -1
  64. package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  65. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  66. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
  67. package/es/ProForm/components/combination/FormList/utils.js +6 -5
  68. package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
  69. package/es/ProForm/components/combination/Group/utils.js +8 -1
  70. package/es/ProForm/components/combination/ProCascader/index.js +1 -1
  71. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
  72. package/es/ProForm/components/combination/ProModalSelect/index.js +50 -45
  73. package/es/ProForm/components/combination/ProNumberRange/index.js +14 -5
  74. package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -1
  75. package/es/ProForm/components/old/ProAddress/index.js +1 -1
  76. package/es/ProForm/components/render/ChangedWrapper.d.ts +17 -0
  77. package/es/ProForm/components/render/ChangedWrapper.js +108 -0
  78. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  79. package/es/ProForm/components/render/Render.js +10 -11
  80. package/es/ProForm/components/render/RenderFields.d.ts +2 -3
  81. package/es/ProForm/components/render/RenderFields.js +3 -4
  82. package/es/ProForm/components/render/propsType.d.ts +5 -4
  83. package/es/ProForm/index.js +4 -7
  84. package/es/ProForm/propsType.d.ts +13 -2
  85. package/es/ProForm/style/index.less +103 -5
  86. package/es/ProForm/utils/diffOriginal.d.ts +4 -4
  87. package/es/ProForm/utils/diffOriginal.js +18 -7
  88. package/es/ProForm/utils/transformValue.js +17 -11
  89. package/es/ProForm/utils/useForm.js +1 -1
  90. package/es/ProForm/utils/useShouldUpdate.d.ts +2 -2
  91. package/es/ProForm/utils/useShouldUpdate.js +1 -1
  92. package/es/ProSelect/index.js +12 -11
  93. package/es/ProSelect/propsType.d.ts +4 -0
  94. package/es/ProSelect/utils/index.js +5 -4
  95. package/es/ProStep/components/Listener/index.d.ts +1 -1
  96. package/es/ProStep/components/Listener/index.js +6 -3
  97. package/es/ProStep/index.d.ts +1 -1
  98. package/es/ProStep/index.js +25 -18
  99. package/es/ProTable/components/FormatColumn/index.d.ts +7 -1
  100. package/es/ProTable/components/FormatColumn/index.js +14 -8
  101. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
  102. package/es/ProTable/hooks/useAntdTable.js +3 -3
  103. package/es/ProTable/index.js +30 -13
  104. package/es/ProTable/propsType.d.ts +14 -1
  105. package/es/ProTable/style/index.less +1 -1
  106. package/es/ProTree/components/AdaptiveTooltip.d.ts +4 -0
  107. package/es/ProTree/components/AdaptiveTooltip.js +55 -0
  108. package/es/ProTree/components/List.js +15 -3
  109. package/es/ProTree/components/ProTree.js +1 -1
  110. package/es/ProTree/components/ProTreeSelect/index.js +28 -8
  111. package/es/ProTree/components/ProTreeSelect/propsType.d.ts +2 -0
  112. package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
  113. package/es/ProTree/components/SearchTitle.d.ts +2 -0
  114. package/es/ProTree/components/SearchTitle.js +17 -8
  115. package/es/ProTree/components/Tree.js +1 -1
  116. package/es/ProTree/style/index.less +14 -0
  117. package/es/ProTreeModal/components/Tree.js +15 -17
  118. package/es/ProTreeModal/index.js +62 -7
  119. package/es/ProTreeModal/utils.d.ts +1 -0
  120. package/es/ProTreeModal/utils.js +21 -1
  121. package/es/ProUpload/components/ImageRender.js +1 -1
  122. package/es/ProViewer/index.js +2 -2
  123. package/es/old/ProEditableTable/index.js +4 -4
  124. package/es/style/theme/antd.less +5 -0
  125. package/es/style/theme/index.less +2 -1
  126. package/es/style/theme/tokens.less +1 -0
  127. package/es/utils/index.d.ts +2 -0
  128. package/es/utils/index.js +13 -0
  129. package/lib/ProAction/index.js +1 -1
  130. package/lib/ProDownload/index.js +3 -3
  131. package/lib/ProDownload/utils.js +3 -3
  132. package/lib/ProDrawerForm/components/ProDrawer/index.js +4 -4
  133. package/lib/ProDrawerForm/components/ProModal/index.js +3 -3
  134. package/lib/ProEditLabel/index.js +3 -3
  135. package/lib/ProEditTable/components/ActionButton/index.js +3 -3
  136. package/lib/ProEditTable/components/RenderField/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
  137. package/lib/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +25 -11
  138. package/lib/ProEditTable/components/RenderField/index.js +8 -8
  139. package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
  140. package/lib/ProEditTable/utils/config.js +2 -2
  141. package/lib/ProEditTable/utils/index.js +5 -5
  142. package/lib/ProEditTable/utils/tools.js +1 -1
  143. package/lib/ProEnum/components/Group.js +10 -2
  144. package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
  145. package/lib/ProEnum/index.js +6 -5
  146. package/lib/ProEnum/style/index.less +14 -4
  147. package/lib/ProEnum/utils/index.d.ts +1 -1
  148. package/lib/ProEnum/utils/index.js +4 -0
  149. package/lib/ProForm/components/combination/Container/index.js +5 -3
  150. package/lib/ProForm/components/combination/Container/propsType.d.ts +2 -1
  151. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  152. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  153. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
  154. package/lib/ProForm/components/combination/FormList/utils.js +5 -4
  155. package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
  156. package/lib/ProForm/components/combination/Group/utils.js +8 -1
  157. package/lib/ProForm/components/combination/ProCascader/index.js +1 -1
  158. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
  159. package/lib/ProForm/components/combination/ProModalSelect/index.js +49 -44
  160. package/lib/ProForm/components/combination/ProNumberRange/index.js +14 -5
  161. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -1
  162. package/lib/ProForm/components/old/ProAddress/index.js +1 -1
  163. package/lib/ProForm/components/render/ChangedWrapper.d.ts +17 -0
  164. package/lib/ProForm/components/render/ChangedWrapper.js +113 -0
  165. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  166. package/lib/ProForm/components/render/Render.js +10 -11
  167. package/lib/ProForm/components/render/RenderFields.d.ts +2 -3
  168. package/lib/ProForm/components/render/RenderFields.js +3 -4
  169. package/lib/ProForm/components/render/propsType.d.ts +5 -4
  170. package/lib/ProForm/index.js +4 -7
  171. package/lib/ProForm/propsType.d.ts +13 -2
  172. package/lib/ProForm/style/index.less +103 -5
  173. package/lib/ProForm/utils/diffOriginal.d.ts +4 -4
  174. package/lib/ProForm/utils/diffOriginal.js +18 -7
  175. package/lib/ProForm/utils/transformValue.js +17 -11
  176. package/lib/ProForm/utils/useForm.js +1 -1
  177. package/lib/ProForm/utils/useShouldUpdate.d.ts +2 -2
  178. package/lib/ProForm/utils/useShouldUpdate.js +1 -1
  179. package/lib/ProSelect/index.js +12 -11
  180. package/lib/ProSelect/propsType.d.ts +4 -0
  181. package/lib/ProSelect/utils/index.js +5 -4
  182. package/lib/ProStep/components/Listener/index.d.ts +1 -1
  183. package/lib/ProStep/components/Listener/index.js +6 -3
  184. package/lib/ProStep/index.d.ts +1 -1
  185. package/lib/ProStep/index.js +25 -18
  186. package/lib/ProTable/components/FormatColumn/index.d.ts +7 -1
  187. package/lib/ProTable/components/FormatColumn/index.js +14 -8
  188. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
  189. package/lib/ProTable/hooks/useAntdTable.js +3 -3
  190. package/lib/ProTable/index.js +30 -13
  191. package/lib/ProTable/propsType.d.ts +14 -1
  192. package/lib/ProTable/style/index.less +1 -1
  193. package/lib/ProTree/components/AdaptiveTooltip.d.ts +4 -0
  194. package/lib/ProTree/components/AdaptiveTooltip.js +61 -0
  195. package/lib/ProTree/components/List.js +15 -3
  196. package/lib/ProTree/components/ProTree.js +1 -1
  197. package/lib/ProTree/components/ProTreeSelect/index.js +28 -8
  198. package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +2 -0
  199. package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
  200. package/lib/ProTree/components/SearchTitle.d.ts +2 -0
  201. package/lib/ProTree/components/SearchTitle.js +19 -7
  202. package/lib/ProTree/components/Tree.js +1 -1
  203. package/lib/ProTree/style/index.less +14 -0
  204. package/lib/ProTreeModal/components/Tree.js +15 -17
  205. package/lib/ProTreeModal/index.js +61 -6
  206. package/lib/ProTreeModal/utils.d.ts +1 -0
  207. package/lib/ProTreeModal/utils.js +20 -0
  208. package/lib/ProUpload/components/ImageRender.js +1 -1
  209. package/lib/ProViewer/index.js +2 -2
  210. package/lib/old/ProEditableTable/index.js +4 -4
  211. package/lib/style/theme/antd.less +5 -0
  212. package/lib/style/theme/index.less +2 -1
  213. package/lib/style/theme/tokens.less +1 -0
  214. package/lib/utils/index.d.ts +2 -0
  215. package/lib/utils/index.js +19 -0
  216. package/package.json +3 -1
  217. package/patches/rc-table+7.26.0.patch +49 -0
  218. package/es/ProForm/components/render/Changed.d.ts +0 -14
  219. package/es/ProForm/components/render/Changed.js +0 -64
  220. package/lib/ProForm/components/render/Changed.d.ts +0 -14
  221. package/lib/ProForm/components/render/Changed.js +0 -69
  222. /package/es/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
  223. /package/es/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
  224. /package/es/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
  225. /package/es/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
  226. /package/lib/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
  227. /package/lib/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
  228. /package/lib/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
  229. /package/lib/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { isEqualWith, isFunction } from 'lodash';
1
+ import { isEqualWith } from 'lodash';
2
2
  import React from 'react';
3
3
  /**
4
4
  * namesPath生产 [['list', 0, 'min'], ['list', 0, 'max']] => list_0_min-list_0_max
@@ -23,11 +23,12 @@ export var namesPathTransform = function namesPathTransform(_ref) {
23
23
  // 比较memo
24
24
  export var memoWith = function memoWith(pre, next) {
25
25
  return isEqualWith(pre, next, function (objValue, othValue) {
26
- if ( /*#__PURE__*/React.isValidElement(objValue) && /*#__PURE__*/React.isValidElement(othValue)) {
27
- return true;
28
- }
29
- if (isFunction(objValue) && isFunction(othValue)) {
26
+ if (/*#__PURE__*/React.isValidElement(objValue) && /*#__PURE__*/React.isValidElement(othValue)) {
30
27
  return true;
31
28
  }
29
+ // 移除解决formlist函数里不更新问题
30
+ // if (isFunction(objValue) && isFunction(othValue)) {
31
+ // return true;
32
+ // }
32
33
  });
33
34
  };
@@ -48,7 +48,7 @@ var ComRender = function ComRender(props) {
48
48
  };
49
49
  var _props = mergedGetValueProps(fieldProps.value);
50
50
  var componentProps = _objectSpread(_objectSpread(_objectSpread({}, fieldProps), rest), _props);
51
- var Component = component ? ( /*#__PURE__*/React.cloneElement(component, _objectSpread({}, componentProps))) : _jsx(TypeComponent, _objectSpread({}, componentProps));
51
+ var Component = component ? (/*#__PURE__*/React.cloneElement(component, _objectSpread({}, componentProps))) : _jsx(TypeComponent, _objectSpread({}, componentProps));
52
52
  var Com = getComRender(Component, props, componentProps);
53
53
  return _jsx(FieldProvider, {
54
54
  value: _objectSpread(_objectSpread({}, contextProps), {}, {
@@ -283,10 +283,17 @@ export var useTransformColumns = function useTransformColumns(params) {
283
283
  option: args === null || args === void 0 ? void 0 : args[1]
284
284
  });
285
285
  };
286
+ // 内外一个为true则为true
287
+ var getLastDisabled = function getLastDisabled() {
288
+ if (Array.isArray(groupProps.disabled)) {
289
+ return reactiveProps.disabled || groupProps.disabled[index];
290
+ }
291
+ return reactiveProps.disabled || groupProps.disabled;
292
+ };
286
293
  return _objectSpread(_objectSpread(_objectSpread({}, column), {}, {
287
294
  name: columnName
288
295
  }, reactiveProps), {}, {
289
- disabled: reactiveProps.disabled || groupProps.disabled,
296
+ disabled: getLastDisabled(),
290
297
  getValueProps: transform === null || transform === void 0 ? void 0 : transform.getValueProps,
291
298
  fieldProps: _objectSpread(_objectSpread({}, column === null || column === void 0 ? void 0 : column.fieldProps), {}, {
292
299
  onChange: handleChange,
@@ -112,7 +112,7 @@ var ProCascader = function ProCascader(props) {
112
112
  defaultLabel = _useState4[0],
113
113
  setDefaultLabel = _useState4[1];
114
114
  var getFirstLevelOptions = /*#__PURE__*/function () {
115
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
115
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
116
116
  var _yield$service, data, newData, transFormData, serviceData;
117
117
  return _regeneratorRuntime().wrap(function _callee$(_context) {
118
118
  while (1) switch (_context.prev = _context.next) {
@@ -24,7 +24,7 @@ var useDefaultOptions = function useDefaultOptions(options) {
24
24
  });
25
25
  };
26
26
  var defaultService = /*#__PURE__*/function () {
27
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
27
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
28
28
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29
29
  while (1) switch (_context.prev = _context.next) {
30
30
  case 0:
@@ -27,7 +27,7 @@ import { SearchOutlined } from '@ant-design/icons';
27
27
  import { useDeepCompareEffect, useMount, useSetState } from 'ahooks';
28
28
  import { debounce, isArray, isEqual, isFunction, omit } from 'lodash';
29
29
  import { ReactSVG } from 'react-svg';
30
- import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
30
+ import React, { forwardRef, useImperativeHandle, useMemo } from 'react';
31
31
  import { ProForm, ProDrawerForm, ProTable, useProConfig, ProSelect } from '../../../../index';
32
32
  import Container from '../../Container';
33
33
  import viewSvg from '../../../../assets/view.svg';
@@ -137,10 +137,10 @@ var ProModalSelect = function ProModalSelect(props, ref) {
137
137
  }, _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
138
138
  manual: true,
139
139
  onSuccess: function onSuccess(res) {
140
- var _res$data;
140
+ var _res$data, _ref5;
141
141
  var list = withPagination ? res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list : res === null || res === void 0 ? void 0 : res.data;
142
142
  setState({
143
- options: transformResponse ? transformResponse(res === null || res === void 0 ? void 0 : res.data) : list
143
+ options: (_ref5 = transformResponse ? transformResponse(res === null || res === void 0 ? void 0 : res.data) : list) !== null && _ref5 !== void 0 ? _ref5 : []
144
144
  });
145
145
  }
146
146
  })),
@@ -166,9 +166,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
166
166
  };
167
167
  var handleFormat = onFormat || defaultOptionRender;
168
168
  if (showCodeName) {
169
- handleFormat = function handleFormat(_ref5) {
170
- var value = _ref5.value,
171
- label = _ref5.label;
169
+ handleFormat = function handleFormat(_ref6) {
170
+ var value = _ref6.value,
171
+ label = _ref6.label;
172
172
  return "".concat(value, "-").concat(label);
173
173
  };
174
174
  }
@@ -237,7 +237,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
237
237
  onChange(val, option);
238
238
  };
239
239
  var handleClick = /*#__PURE__*/function () {
240
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
240
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
241
241
  var _yield$beforeOpen, res;
242
242
  return _regeneratorRuntime().wrap(function _callee$(_context) {
243
243
  while (1) switch (_context.prev = _context.next) {
@@ -280,7 +280,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
280
280
  }, _callee);
281
281
  }));
282
282
  return function handleClick() {
283
- return _ref6.apply(this, arguments);
283
+ return _ref7.apply(this, arguments);
284
284
  };
285
285
  }();
286
286
  var handleClose = function handleClose() {
@@ -299,7 +299,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
299
299
  }
300
300
  };
301
301
  var handleFinish = /*#__PURE__*/function () {
302
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
302
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
303
303
  var _nextSelectedRows, _nextSelectedRows2, nextSelectedRows, record, flag, res;
304
304
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
305
305
  while (1) switch (_context2.prev = _context2.next) {
@@ -360,11 +360,11 @@ var ProModalSelect = function ProModalSelect(props, ref) {
360
360
  }, _callee2, null, [[0, 18]]);
361
361
  }));
362
362
  return function handleFinish() {
363
- return _ref7.apply(this, arguments);
363
+ return _ref8.apply(this, arguments);
364
364
  };
365
365
  }();
366
366
  var handleSearch = /*#__PURE__*/function () {
367
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
367
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
368
368
  var values;
369
369
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
370
370
  while (1) switch (_context3.prev = _context3.next) {
@@ -383,7 +383,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
383
383
  }, _callee3);
384
384
  }));
385
385
  return function handleSearch() {
386
- return _ref8.apply(this, arguments);
386
+ return _ref9.apply(this, arguments);
387
387
  };
388
388
  }();
389
389
  var _rowSelection = _objectSpread({
@@ -437,7 +437,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
437
437
  };
438
438
  // 初始化回显,当传入initParams时,前端用来回险
439
439
  var getInitValues = /*#__PURE__*/function () {
440
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
440
+ var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
441
441
  var _contentForm$getField, _useRequest$options2, _useRequest$options3, queryBean, page, params, res, _res$data2, _list, list, _data, nextSelectRowKeys;
442
442
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
443
443
  while (1) switch (_context4.prev = _context4.next) {
@@ -495,12 +495,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
495
495
  }, _callee4);
496
496
  }));
497
497
  return function getInitValues() {
498
- return _ref9.apply(this, arguments);
498
+ return _ref10.apply(this, arguments);
499
499
  };
500
500
  }();
501
501
  // 初始化回显,当传入initParams时,前端用来回险
502
502
  var getDefaultOneValues = /*#__PURE__*/function () {
503
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
503
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
504
504
  var _useRequest$options4, _useRequest$options5;
505
505
  var queryBean, page, params, res, _res$data3, _list2, list, _data2, nextSelectRowKeys;
506
506
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -548,7 +548,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
548
548
  }, _callee5);
549
549
  }));
550
550
  return function getDefaultOneValues() {
551
- return _ref10.apply(this, arguments);
551
+ return _ref11.apply(this, arguments);
552
552
  };
553
553
  }();
554
554
  useImperativeHandle(ref, function () {
@@ -579,7 +579,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
579
579
  });
580
580
  }
581
581
  });
582
- useEffect(function () {
582
+ useDeepCompareEffect(function () {
583
583
  if (onOff && !visible) {
584
584
  var _useRequest$options6;
585
585
  if ((useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options6 = useRequest.options) === null || _useRequest$options6 === void 0 ? void 0 : _useRequest$options6.manual) !== true) {
@@ -615,34 +615,39 @@ var ProModalSelect = function ProModalSelect(props, ref) {
615
615
  setState(nextState);
616
616
  }
617
617
  }, [onOff, visible, value]);
618
- useEffect(function () {
619
- if (value && !visible && isInit) {
620
- if (readOnly) {
621
- // 加定时器 修复依赖数据同步更新未取到问题
622
- setTimeout(function () {
623
- var _useRequest$options7, _useRequest$options8;
624
- var initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams;
625
- if (typeof (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) === 'function') {
626
- var _contentForm$getField2;
627
- initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 ? void 0 : (_contentForm$getField2 = contentForm.getFieldsValue) === null || _contentForm$getField2 === void 0 ? void 0 : _contentForm$getField2.call(contentForm));
628
- }
629
- var params = withPagination ? {
630
- pageNum: 1,
631
- pageSize: 50,
632
- queryBean: _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.defaultParams), initParams)
633
- } : _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options8 = useRequest.options) === null || _useRequest$options8 === void 0 ? void 0 : _useRequest$options8.defaultParams), initParams);
634
- var nextParams = transformParams ? transformParams(params) : params;
635
- run(nextParams);
636
- setState({
637
- isInit: false
638
- });
639
- }, 300);
640
- } else {
641
- getInitValues();
618
+ useDeepCompareEffect(function () {
619
+ if (value && !visible && isInit && !readOnly) {
620
+ getInitValues();
621
+ }
622
+ }, [value, visible, isInit]);
623
+ useDeepCompareEffect(function () {
624
+ if (value && !visible && readOnly) {
625
+ var _options$some;
626
+ var isHasValue = options === null || options === void 0 ? void 0 : (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, function (item) {
627
+ return item[valueKey] === value;
628
+ });
629
+ if (isHasValue) {
630
+ return;
642
631
  }
632
+ // 加定时器 修复依赖数据同步更新未取到问题
633
+ setTimeout(function () {
634
+ var _useRequest$options7, _useRequest$options8;
635
+ var initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams;
636
+ if (typeof (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) === 'function') {
637
+ var _contentForm$getField2;
638
+ initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 ? void 0 : (_contentForm$getField2 = contentForm.getFieldsValue) === null || _contentForm$getField2 === void 0 ? void 0 : _contentForm$getField2.call(contentForm));
639
+ }
640
+ var params = withPagination ? {
641
+ pageNum: 1,
642
+ pageSize: 50,
643
+ queryBean: _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.defaultParams), initParams)
644
+ } : _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options8 = useRequest.options) === null || _useRequest$options8 === void 0 ? void 0 : _useRequest$options8.defaultParams), initParams);
645
+ var nextParams = transformParams ? transformParams(params) : params;
646
+ run(nextParams);
647
+ }, 300);
643
648
  }
644
- }, [value, visible, isInit, useRequest]);
645
- useEffect(function () {
649
+ }, [value, options, visible, useRequest]);
650
+ useDeepCompareEffect(function () {
646
651
  if (!value) {
647
652
  if (defaultOne) {
648
653
  getDefaultOneValues();
@@ -742,7 +747,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
742
747
  children: customRender
743
748
  });
744
749
  }
745
- useEffect(function () {
750
+ useDeepCompareEffect(function () {
746
751
  if (isTooltip && value) {
747
752
  var dom = document.getElementById(uuid);
748
753
  dom.addEventListener('mouseover', function (e) {
@@ -779,7 +784,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
779
784
  }, [value, isTooltip]);
780
785
  useDeepCompareEffect(function () {
781
786
  setState({
782
- options: tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource
787
+ options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || []
783
788
  });
784
789
  }, [tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource]);
785
790
  // 当搜索条件只有一个时,且为输入框,默认设置suffix
@@ -13,11 +13,9 @@ import { tools } from '@zat-design/utils';
13
13
  import Container from '../../Container';
14
14
  import locale from '../../../../locale';
15
15
  import ProForm from '../../../../ProForm';
16
- var formatAmount = tools.formatAmount,
17
- formatPercent = tools.formatPercent,
18
- formatPerMill = tools.formatPerMill;
16
+ var formatAmount = tools.formatAmount;
19
17
  var ProNumberRange = function ProNumberRange(props) {
20
- var _valueProps, _ref2, _ref3, _value$, _valueProps2, _ref4, _ref5, _value$2, _valueProps3, _valueProps4;
18
+ var _document$querySelect, _valueProps, _ref2, _ref3, _value$, _valueProps2, _ref4, _ref5, _value$2, _valueProps3, _valueProps4;
21
19
  var _props$value = props.value,
22
20
  value = _props$value === void 0 ? [] : _props$value,
23
21
  _props$onChange = props.onChange,
@@ -42,6 +40,7 @@ var ProNumberRange = function ProNumberRange(props) {
42
40
  viewEmpty = _ref.viewEmpty,
43
41
  valueType = _ref.valueType;
44
42
  var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
43
+ var addonAfterDomWidth = (_document$querySelect = document.querySelector('.ant-input-number-group-addon')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.clientWidth;
45
44
  var _useSetState = useSetState({
46
45
  range: value || []
47
46
  }),
@@ -87,11 +86,15 @@ var ProNumberRange = function ProNumberRange(props) {
87
86
  };
88
87
  var cls = classnames({
89
88
  'pro-number-range': true,
89
+ 'pro-number-range-after': addonAfter,
90
+ 'pro-number-range-before': addonBefore,
90
91
  className: className
91
92
  });
92
93
  // 查看模式
93
94
  if (isView || props.isView) {
94
- if (isEmpty(value)) {
95
+ if (isEmpty(value) || (value === null || value === void 0 ? void 0 : value.every(function (item) {
96
+ return typeof item !== 'number';
97
+ }))) {
95
98
  return viewEmpty;
96
99
  }
97
100
  switch (valueType) {
@@ -188,6 +191,9 @@ var ProNumberRange = function ProNumberRange(props) {
188
191
  },
189
192
  addonBefore: addonBefore
190
193
  }, valueProps), {}, {
194
+ style: addonAfter ? {
195
+ width: "calc(50% - ".concat(16 + addonAfterDomWidth / 2, "px)")
196
+ } : null,
191
197
  min: min !== null && min !== void 0 ? min : (_valueProps = valueProps) === null || _valueProps === void 0 ? void 0 : _valueProps.min,
192
198
  max: (_ref2 = (_ref3 = (_value$ = value === null || value === void 0 ? void 0 : value[1]) !== null && _value$ !== void 0 ? _value$ : range[1]) !== null && _ref3 !== void 0 ? _ref3 : max) !== null && _ref2 !== void 0 ? _ref2 : (_valueProps2 = valueProps) === null || _valueProps2 === void 0 ? void 0 : _valueProps2.max
193
199
  }, childProps === null || childProps === void 0 ? void 0 : childProps[0])), _jsx(_Input, {
@@ -208,6 +214,9 @@ var ProNumberRange = function ProNumberRange(props) {
208
214
  },
209
215
  addonAfter: addonAfter
210
216
  }, valueProps), {}, {
217
+ style: addonAfter ? {
218
+ width: "calc(50% - ".concat(16 - addonAfterDomWidth / 2, "px)")
219
+ } : null,
211
220
  min: (_ref4 = (_ref5 = (_value$2 = value === null || value === void 0 ? void 0 : value[0]) !== null && _value$2 !== void 0 ? _value$2 : range[0]) !== null && _ref5 !== void 0 ? _ref5 : min) !== null && _ref4 !== void 0 ? _ref4 : (_valueProps3 = valueProps) === null || _valueProps3 === void 0 ? void 0 : _valueProps3.min,
212
221
  max: max !== null && max !== void 0 ? max : (_valueProps4 = valueProps) === null || _valueProps4 === void 0 ? void 0 : _valueProps4.max
213
222
  }, childProps === null || childProps === void 0 ? void 0 : childProps[1]))]
@@ -40,8 +40,12 @@
40
40
 
41
41
  .range-left,
42
42
  .range-right {
43
- width: calc(50% - 20px);
43
+ width: calc(50% - 16px);
44
44
  text-align: center;
45
+ transition: none;
46
+ .range-left {
47
+ width: calc(100% + 2px) !important;
48
+ }
45
49
  }
46
50
 
47
51
  .range-left {
@@ -92,7 +92,7 @@ export function ProAddress(_ref3) {
92
92
  secondCitys = _useState6[0],
93
93
  setSecondCitys = _useState6[1];
94
94
  var queryCity = /*#__PURE__*/function () {
95
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(code, type) {
95
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(code, type) {
96
96
  var cityList, _cityList, newList, _secondCitys;
97
97
  return _regeneratorRuntime().wrap(function _callee$(_context) {
98
98
  while (1) switch (_context.prev = _context.next) {
@@ -0,0 +1,17 @@
1
+ import { FormInstance } from 'antd';
2
+ import { NamePath } from 'antd/lib/form/interface';
3
+ import React from 'react';
4
+ import { DiffOriginalParams } from '../../utils/diffOriginal';
5
+ import { DiffConfigProps } from '../../propsType';
6
+ interface Props {
7
+ name?: NamePath;
8
+ names?: NamePath[];
9
+ namesStr?: string;
10
+ diffConfig?: DiffConfigProps;
11
+ form: FormInstance;
12
+ equalWith?: DiffOriginalParams['equalWith'];
13
+ valuePropName?: string;
14
+ [name: string]: any;
15
+ }
16
+ declare const ChangedWrapper: React.FC<Props>;
17
+ export default ChangedWrapper;
@@ -0,0 +1,108 @@
1
+ import "antd/es/space/style";
2
+ import _Space from "antd/es/space";
3
+ import "antd/es/tooltip/style";
4
+ import _Tooltip from "antd/es/tooltip";
5
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
8
+ var _excluded = ["name", "names", "namesStr", "form", "equalWith", "children", "type", "diffConfig", "valuePropName"];
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ import classNames from 'classnames';
11
+ import { get } from 'lodash';
12
+ import React, { useMemo } from 'react';
13
+ import { diffOriginal } from '../../utils/diffOriginal';
14
+ import { useProConfig } from '../../../ProConfigProvider';
15
+ import { isEmpty } from '../../../utils';
16
+ var ChangedWrapper = function ChangedWrapper(props) {
17
+ var _diffConfig$toolTip, _children$props, _children$props2, _children$props3;
18
+ var name = props.name,
19
+ names = props.names,
20
+ namesStr = props.namesStr,
21
+ form = props.form,
22
+ equalWith = props.equalWith,
23
+ children = props.children,
24
+ type = props.type,
25
+ diffConfig = props.diffConfig,
26
+ _props$valuePropName = props.valuePropName,
27
+ valuePropName = _props$valuePropName === void 0 ? 'value' : _props$valuePropName,
28
+ rest = _objectWithoutProperties(props, _excluded);
29
+ var _useProConfig = useProConfig('ProForm'),
30
+ isDiffAll = _useProConfig.isDiffAll;
31
+ var originalValues = diffConfig.originalValues,
32
+ changeTipColor = diffConfig.changeTipColor,
33
+ addTipColor = diffConfig.addTipColor;
34
+ var toolTip = (_diffConfig$toolTip = diffConfig.toolTip) !== null && _diffConfig$toolTip !== void 0 ? _diffConfig$toolTip : true;
35
+ var isWatch = toolTip && !['FormList', 'ProEditTable'].includes(type);
36
+ var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
37
+ return get(originalValues, name);
38
+ }) : get(originalValues, name);
39
+ var noChange = !equalWith && (!originalValues || isDiffAll ? false : isEmpty(originalValue));
40
+ var diffType = useMemo(function () {
41
+ if (!isWatch || noChange) return 'same';
42
+ return diffOriginal({
43
+ originalValue: originalValue,
44
+ value: props[valuePropName],
45
+ form: form,
46
+ equalWith: equalWith
47
+ // name: namesStr || name,
48
+ });
49
+ }, [isWatch, noChange, props[valuePropName], originalValue]);
50
+ var isAdd = diffType === 'add';
51
+ var isChanged = diffType === 'changed';
52
+ var tipContent = useMemo(function () {
53
+ if (!isWatch || noChange) return undefined;
54
+ return /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), {}, _defineProperty({
55
+ isView: true
56
+ }, valuePropName, originalValue))) : undefined;
57
+ }, [originalValue, children]);
58
+ if (!isWatch || noChange) {
59
+ // 嵌套子组件
60
+ var isNestedField = ['ProEditTable'].includes(type);
61
+ return /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({
62
+ originalValues: isNestedField ? originalValues : undefined
63
+ }, children.props), rest));
64
+ }
65
+ var tipOpenCalc = function tipOpenCalc() {
66
+ if (!toolTip) return false;
67
+ // 传入undefined 鼠标移入显示移出隐藏
68
+ return isChanged ? undefined : false;
69
+ };
70
+ var style = {
71
+ '--zaui-contract-bg': changeTipColor,
72
+ '--zaui-contract-bg-add': addTipColor
73
+ };
74
+ var diffClassName = classNames({
75
+ 'pro-form-item-changed': isChanged,
76
+ 'pro-form-item-add': isAdd
77
+ });
78
+ // @ts-ignore
79
+ var _showEllipse = ((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.showEllipse) || ((_children$props2 = children.props) === null || _children$props2 === void 0 ? void 0 : _children$props2.tooltip);
80
+ return _jsx(_Tooltip, {
81
+ open: tipOpenCalc(),
82
+ // mouseEnterDelay={1}
83
+ getPopupContainer: function getPopupContainer(target) {
84
+ return target.parentElement;
85
+ },
86
+ title: _jsxs(_Space, {
87
+ direction: "vertical",
88
+ children: [_jsxs(_Space, {
89
+ children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
90
+ }), _showEllipse && _jsxs(_Space, {
91
+ children: ["\u5F53\u524D\u503C\uFF1A", /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread(_objectSpread({}, children.props), rest), {}, {
92
+ isView: true
93
+ })) : undefined]
94
+ })]
95
+ }),
96
+ placement: "topLeft",
97
+ children: _jsx("div", {
98
+ className: diffClassName,
99
+ style: style,
100
+ children: /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread(_objectSpread({}, children.props), rest), {}, {
101
+ otherProps: _objectSpread(_objectSpread({}, (_children$props3 = children.props) === null || _children$props3 === void 0 ? void 0 : _children$props3.otherProps), {}, {
102
+ isDiffChange: isChanged
103
+ })
104
+ })) : undefined
105
+ })
106
+ });
107
+ };
108
+ export default ChangedWrapper;
@@ -22,7 +22,7 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
22
22
  var _ProForm$useFieldProp = ProForm.useFieldProps(),
23
23
  form = _ProForm$useFieldProp.form;
24
24
  var handleChange = /*#__PURE__*/function () {
25
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
25
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
26
26
  var _len,
27
27
  other,
28
28
  _key,
@@ -28,7 +28,7 @@ import valueTypeMap from '../../utils/valueType';
28
28
  import tipSvg from '../../../assets/tip.svg';
29
29
  import useRules from '../../utils/useRules';
30
30
  import ConfirmWrapper from './ConfirmWrapper';
31
- import Changed from './Changed';
31
+ import ChangedWrapper from './ChangedWrapper';
32
32
  // 这个组件只管渲染, 参数的整理在外部处理
33
33
  var Render = function Render(props) {
34
34
  var _ref2, _ref3, _ref4, _ref5, _otherProps$names2;
@@ -46,12 +46,11 @@ var Render = function Render(props) {
46
46
  formDisabled = props.formDisabled,
47
47
  type = props.type,
48
48
  isSelect = props.isSelect,
49
- originalValues = props.originalValues,
50
49
  equalWith = props.equalWith,
51
50
  requiredOnView = props.requiredOnView,
52
- originalDiffTip = props.originalDiffTip,
53
51
  confirm = props.confirm,
54
- globalControl = props.globalControl;
52
+ globalControl = props.globalControl,
53
+ diffConfig = props.diffConfig;
55
54
  var colProps = props.colProps;
56
55
  // 剔除一些不是FormItem的属性, 防止控制台报warning
57
56
  var labelWidth = formItemProps.labelWidth,
@@ -241,7 +240,7 @@ var Render = function Render(props) {
241
240
  _args = functionArgs([].concat(args));
242
241
  }
243
242
  var inList = _otherFormItemProps === null || _otherFormItemProps === void 0 ? void 0 : (_otherFormItemProps$n3 = _otherFormItemProps.namePath) === null || _otherFormItemProps$n3 === void 0 ? void 0 : _otherFormItemProps$n3.length;
244
- if ( /*#__PURE__*/React.isValidElement(AutoComponent)) {
243
+ if (/*#__PURE__*/React.isValidElement(AutoComponent)) {
245
244
  var _AutoComponent$props$, _AutoComponent$props, _lastComponentProps$c;
246
245
  ((_AutoComponent$props$ = (_AutoComponent$props = AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props)[changeKey]) === null || _AutoComponent$props$ === void 0 ? void 0 : _AutoComponent$props$.call.apply(_AutoComponent$props$, [_AutoComponent$props].concat(_toConsumableArray(_args)))) || ((_lastComponentProps$c = lastComponentProps[changeKey]) === null || _lastComponentProps$c === void 0 ? void 0 : _lastComponentProps$c.call.apply(_lastComponentProps$c, [lastComponentProps].concat(_toConsumableArray(_args))));
247
246
  return false;
@@ -291,7 +290,7 @@ var Render = function Render(props) {
291
290
  * onBlur参数重置 (value, record, { form, index, namePath, option }) => void
292
291
  */
293
292
  var handleBlur = /*#__PURE__*/function () {
294
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
293
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
295
294
  var _len3,
296
295
  args,
297
296
  _key3,
@@ -374,7 +373,7 @@ var Render = function Render(props) {
374
373
  if (originComponent) {
375
374
  delete childProps.otherProps;
376
375
  }
377
- var child = /*#__PURE__*/React.isValidElement(AutoComponent) ? ( /*#__PURE__*/React.cloneElement(AutoComponent, childProps)) : _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps, [].concat(lastComponentPropsFilter, ['debounceWait']))), {}, {
376
+ var child = /*#__PURE__*/React.isValidElement(AutoComponent) ? (/*#__PURE__*/React.cloneElement(AutoComponent, childProps)) : _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps, [].concat(lastComponentPropsFilter, ['debounceWait']))), {}, {
378
377
  otherProps: _objectSpread(_objectSpread({}, otherProps), {}, {
379
378
  show: show,
380
379
  disabled: lastDisabled,
@@ -427,17 +426,17 @@ var Render = function Render(props) {
427
426
  span: 24 // 默认占一行
428
427
  });
429
428
  }
430
- if (originalValues) {
431
- child = _jsx(Changed, {
429
+ if (diffConfig) {
430
+ child = _jsx(ChangedWrapper, {
432
431
  name: formItemProps.name,
433
432
  names: otherProps.names,
434
433
  namesStr: namesStr,
435
- originalValues: originalValues,
434
+ diffConfig: diffConfig,
436
435
  form: form,
437
436
  equalWith: equalWith,
438
- originalDiffTip: originalDiffTip,
439
437
  type: type,
440
438
  onChange: handleChange,
439
+ valuePropName: _otherFormItemProps.valuePropName,
441
440
  children: child
442
441
  });
443
442
  }
@@ -2,7 +2,7 @@ import { ColProps } from 'antd';
2
2
  import { FormInstance } from 'antd/es/form/Form';
3
3
  import React from 'react';
4
4
  import { ProColumnProps } from './propsType';
5
- import { ProFormProps } from '../../propsType';
5
+ import { DiffConfigProps } from '../../propsType';
6
6
  interface Props<T = any> {
7
7
  isView?: boolean;
8
8
  columns: ProColumnProps[];
@@ -13,11 +13,10 @@ interface Props<T = any> {
13
13
  viewEmpty?: React.ReactNode;
14
14
  openState?: boolean;
15
15
  labelWidth?: string | number;
16
- originalValues?: ProFormProps<T>['originalValues'];
16
+ diffConfig?: DiffConfigProps;
17
17
  clearNotShow?: boolean;
18
18
  requiredOnView?: boolean;
19
19
  required?: boolean | boolean[] | (() => boolean | boolean[]);
20
- originalDiffTip?: boolean;
21
20
  globalControl?: boolean;
22
21
  }
23
22
  declare const RenderFields: React.FC<Props>;
@@ -22,11 +22,10 @@ var RenderFields = function RenderFields(props) {
22
22
  viewEmpty = _props$viewEmpty === void 0 ? '-' : _props$viewEmpty,
23
23
  openState = props.openState,
24
24
  labelWidth = props.labelWidth,
25
- originalValues = props.originalValues,
26
25
  outerClearNotShow = props.clearNotShow,
27
26
  requiredOnView = props.requiredOnView,
28
27
  required = props.required,
29
- originalDiffTip = props.originalDiffTip,
28
+ diffConfig = props.diffConfig,
30
29
  globalControl = props.globalControl;
31
30
  // 是否包含隐藏字段
32
31
  var hiddenData = columns.filter(function (item) {
@@ -154,6 +153,7 @@ var RenderFields = function RenderFields(props) {
154
153
  if (['ProCollapse', 'Container'].includes(_type)) {
155
154
  componentProps.show = show;
156
155
  componentProps.clearNotShow = clearNotShow;
156
+ componentProps.diffConfig = diffConfig;
157
157
  }
158
158
  // switch与SwitchCheckbox单独添加valuePropName
159
159
  if (['Switch', 'SwitchCheckbox'].includes(_type)) {
@@ -206,10 +206,9 @@ var RenderFields = function RenderFields(props) {
206
206
  otherProps: otherProps,
207
207
  fieldProps: isFunction(fieldProps) ? fieldProps : null,
208
208
  isSelect: _isSelect,
209
- originalValues: originalValues,
209
+ diffConfig: diffConfig,
210
210
  equalWith: equalWith,
211
211
  requiredOnView: requiredOnView,
212
- originalDiffTip: originalDiffTip,
213
212
  globalControl: globalControl
214
213
  })
215
214
  }, "".concat(_formItemProps.name || _formItemProps.label).concat(index));