@zat-design/sisyphus-react 3.13.15-beta.2 → 3.13.15-beta.3

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.
@@ -104,7 +104,9 @@ export var useTransformColumns = function useTransformColumns(params) {
104
104
  // @ts-ignore
105
105
  newValue = normalize === null || normalize === void 0 ? void 0 : normalize(newValue);
106
106
  }
107
- internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index);
107
+ // 根据模式选择值管理方式
108
+ names ? form.setFieldValue(columnName, newValue) // 独立字段模式
109
+ : internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index); // 数组值模式
108
110
  var values = form.getFieldValue(namePath);
109
111
  var originRow = (namePath === null || namePath === void 0 ? void 0 : namePath.length) ? _cloneDeep(values) : undefined;
110
112
  onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, args);
@@ -156,9 +158,14 @@ export var useTransformColumns = function useTransformColumns(params) {
156
158
  getValueProps: transform === null || transform === void 0 ? void 0 : transform.getValueProps,
157
159
  fieldProps: _objectSpread(_objectSpread(_objectSpread({}, column === null || column === void 0 ? void 0 : column.fieldProps), reactiveProps === null || reactiveProps === void 0 ? void 0 : reactiveProps.fieldProps), {}, {
158
160
  onChange: handleChange,
159
- onBlur: handleBlur,
161
+ onBlur: handleBlur
162
+ }, names ? {
163
+ value: form.getFieldValue(columnName)
164
+ } // 独立字段模式
165
+ : {
160
166
  value: value === null || value === void 0 ? void 0 : value[index]
161
- })
167
+ } // 数组值模式
168
+ )
162
169
  });
163
170
  });
164
171
  };
@@ -112,7 +112,9 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
112
112
  // @ts-ignore
113
113
  newValue = normalize === null || normalize === void 0 ? void 0 : normalize(newValue);
114
114
  }
115
- internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index);
115
+ // 根据模式选择值管理方式
116
+ names ? form.setFieldValue(columnName, newValue) // 独立字段模式
117
+ : internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index); // 数组值模式
116
118
  var values = form.getFieldValue(namePath);
117
119
  var originRow = (namePath === null || namePath === void 0 ? void 0 : namePath.length) ? (0, _cloneDeep2.default)(values) : undefined;
118
120
  onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, args);
@@ -164,9 +166,14 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
164
166
  getValueProps: transform === null || transform === void 0 ? void 0 : transform.getValueProps,
165
167
  fieldProps: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, column === null || column === void 0 ? void 0 : column.fieldProps), reactiveProps === null || reactiveProps === void 0 ? void 0 : reactiveProps.fieldProps), {}, {
166
168
  onChange: handleChange,
167
- onBlur: handleBlur,
169
+ onBlur: handleBlur
170
+ }, names ? {
171
+ value: form.getFieldValue(columnName)
172
+ } // 独立字段模式
173
+ : {
168
174
  value: value === null || value === void 0 ? void 0 : value[index]
169
- })
175
+ } // 数组值模式
176
+ )
170
177
  });
171
178
  });
172
179
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.13.15-beta.2",
3
+ "version": "3.13.15-beta.3",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",