@zat-design/sisyphus-react 3.7.3-beta.8 → 3.7.3-beta.9

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.
@@ -4,7 +4,7 @@ import "antd/es/tooltip/style";
4
4
  import _Tooltip from "antd/es/tooltip";
5
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
6
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
- var _excluded = ["name", "names", "namesStr", "form", "equalWith", "children", "type", "diffConfig"];
7
+ var _excluded = ["name", "names", "namesStr", "form", "equalWith", "children", "type", "diffConfig", "valuePropName"];
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  import classNames from 'classnames';
10
10
  import { get } from 'lodash';
@@ -22,6 +22,8 @@ var ChangedWrapper = function ChangedWrapper(props) {
22
22
  children = props.children,
23
23
  type = props.type,
24
24
  diffConfig = props.diffConfig,
25
+ _props$valuePropName = props.valuePropName,
26
+ valuePropName = _props$valuePropName === void 0 ? 'value' : _props$valuePropName,
25
27
  rest = _objectWithoutProperties(props, _excluded);
26
28
  var _useProConfig = useProConfig('ProForm'),
27
29
  isDiffAll = _useProConfig.isDiffAll;
@@ -39,12 +41,12 @@ var ChangedWrapper = function ChangedWrapper(props) {
39
41
  if (!isWatch || noChange) return 'same';
40
42
  return diffOriginal({
41
43
  originalValue: originalValue,
42
- value: props.value,
44
+ value: props[valuePropName],
43
45
  form: form,
44
46
  equalWith: equalWith
45
47
  // name: namesStr || name,
46
48
  });
47
- }, [isWatch, noChange, props.value, originalValue]);
49
+ }, [isWatch, noChange, props[valuePropName], originalValue]);
48
50
  var isAdd = diffType === 'add';
49
51
  var isChanged = diffType === 'changed';
50
52
  var tipContent = useMemo(function () {
@@ -436,6 +436,7 @@ var Render = function Render(props) {
436
436
  equalWith: equalWith,
437
437
  type: type,
438
438
  onChange: handleChange,
439
+ valuePropName: _otherFormItemProps.valuePropName,
439
440
  children: child
440
441
  });
441
442
  }
@@ -16,7 +16,7 @@ var _react = _interopRequireWildcard(require("react"));
16
16
  var _diffOriginal = require("../../utils/diffOriginal");
17
17
  var _ProConfigProvider = require("../../../ProConfigProvider");
18
18
  var _utils = require("../../../utils");
19
- var _excluded = ["name", "names", "namesStr", "form", "equalWith", "children", "type", "diffConfig"];
19
+ var _excluded = ["name", "names", "namesStr", "form", "equalWith", "children", "type", "diffConfig", "valuePropName"];
20
20
  var ChangedWrapper = function ChangedWrapper(props) {
21
21
  var _diffConfig$toolTip;
22
22
  var name = props.name,
@@ -27,6 +27,8 @@ var ChangedWrapper = function ChangedWrapper(props) {
27
27
  children = props.children,
28
28
  type = props.type,
29
29
  diffConfig = props.diffConfig,
30
+ _props$valuePropName = props.valuePropName,
31
+ valuePropName = _props$valuePropName === void 0 ? 'value' : _props$valuePropName,
30
32
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
31
33
  var _useProConfig = (0, _ProConfigProvider.useProConfig)('ProForm'),
32
34
  isDiffAll = _useProConfig.isDiffAll;
@@ -44,12 +46,12 @@ var ChangedWrapper = function ChangedWrapper(props) {
44
46
  if (!isWatch || noChange) return 'same';
45
47
  return (0, _diffOriginal.diffOriginal)({
46
48
  originalValue: originalValue,
47
- value: props.value,
49
+ value: props[valuePropName],
48
50
  form: form,
49
51
  equalWith: equalWith
50
52
  // name: namesStr || name,
51
53
  });
52
- }, [isWatch, noChange, props.value, originalValue]);
54
+ }, [isWatch, noChange, props[valuePropName], originalValue]);
53
55
  var isAdd = diffType === 'add';
54
56
  var isChanged = diffType === 'changed';
55
57
  var tipContent = (0, _react.useMemo)(function () {
@@ -436,6 +436,7 @@ var Render = function Render(props) {
436
436
  equalWith: equalWith,
437
437
  type: type,
438
438
  onChange: handleChange,
439
+ valuePropName: _otherFormItemProps.valuePropName,
439
440
  children: child
440
441
  });
441
442
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.7.3-beta.8",
3
+ "version": "3.7.3-beta.9",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",