@zat-design/sisyphus-react 3.4.5-beta.21 → 3.4.5-beta.22
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.
|
@@ -384,13 +384,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
384
384
|
var _onblur = /*#__PURE__*/function () {
|
|
385
385
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
386
386
|
var _TargetComponent3, _TargetComponent3$pro, _TargetComponent$prop4;
|
|
387
|
-
var
|
|
388
|
-
row,
|
|
389
|
-
orgRow,
|
|
390
|
-
_len3,
|
|
387
|
+
var _len3,
|
|
391
388
|
args,
|
|
392
389
|
_key3,
|
|
393
390
|
_args,
|
|
391
|
+
rowPath,
|
|
392
|
+
row,
|
|
393
|
+
orgRow,
|
|
394
394
|
_Object$keys2,
|
|
395
395
|
_Object$keys2$map,
|
|
396
396
|
diff,
|
|
@@ -399,13 +399,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
399
399
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
400
400
|
while (1) switch (_context2.prev = _context2.next) {
|
|
401
401
|
case 0:
|
|
402
|
-
rowPath = [].concat(_toConsumableArray(namePath), [index]);
|
|
403
|
-
row = form.getFieldValue(rowPath);
|
|
404
|
-
orgRow = cloneDeep(row);
|
|
405
402
|
for (_len3 = _args3.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
406
403
|
args[_key3] = _args3[_key3];
|
|
407
404
|
}
|
|
408
|
-
_args = formatArgs(args);
|
|
405
|
+
_args = formatArgs([].concat(args));
|
|
406
|
+
rowPath = [].concat(_toConsumableArray(namePath), [index]);
|
|
407
|
+
row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
|
|
408
|
+
orgRow = cloneDeep(row);
|
|
409
409
|
_args[1] = row;
|
|
410
410
|
_context2.t0 = (_TargetComponent3 = TargetComponent) === null || _TargetComponent3 === void 0 ? void 0 : (_TargetComponent3$pro = _TargetComponent3.props) === null || _TargetComponent3$pro === void 0 ? void 0 : _TargetComponent3$pro.onBlur;
|
|
411
411
|
if (!_context2.t0) {
|
|
@@ -445,14 +445,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
445
445
|
cellNamePath: []
|
|
446
446
|
});
|
|
447
447
|
case 20:
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
});
|
|
455
|
-
}
|
|
448
|
+
// 单行编辑时需要 强制更新视图
|
|
449
|
+
setState({
|
|
450
|
+
forceUpdate: {
|
|
451
|
+
d: Date.now()
|
|
452
|
+
}
|
|
453
|
+
});
|
|
456
454
|
case 21:
|
|
457
455
|
case "end":
|
|
458
456
|
return _context2.stop();
|
|
@@ -7,7 +7,8 @@ export var getRandom = function getRandom() {
|
|
|
7
7
|
export var difference = function difference(object, base) {
|
|
8
8
|
var changes = function changes(object, base) {
|
|
9
9
|
return transform(object, function (result, value, key) {
|
|
10
|
-
|
|
10
|
+
var _key$indexOf;
|
|
11
|
+
if ((key === null || key === void 0 ? void 0 : (_key$indexOf = key.indexOf) === null || _key$indexOf === void 0 ? void 0 : _key$indexOf.call(key, '-')) > -1) {
|
|
11
12
|
result[key] = true;
|
|
12
13
|
} else if (!isEqual(value, base[key])) {
|
|
13
14
|
result[key] = isObject(value) && isObject(base[key]) ? changes(value, base[key]) : value;
|
|
@@ -387,13 +387,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
387
387
|
var _onblur = /*#__PURE__*/function () {
|
|
388
388
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
|
389
389
|
var _TargetComponent3, _TargetComponent3$pro, _TargetComponent$prop4;
|
|
390
|
-
var
|
|
391
|
-
row,
|
|
392
|
-
orgRow,
|
|
393
|
-
_len3,
|
|
390
|
+
var _len3,
|
|
394
391
|
args,
|
|
395
392
|
_key3,
|
|
396
393
|
_args,
|
|
394
|
+
rowPath,
|
|
395
|
+
row,
|
|
396
|
+
orgRow,
|
|
397
397
|
_Object$keys2,
|
|
398
398
|
_Object$keys2$map,
|
|
399
399
|
diff,
|
|
@@ -402,13 +402,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
402
402
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
403
403
|
while (1) switch (_context2.prev = _context2.next) {
|
|
404
404
|
case 0:
|
|
405
|
-
rowPath = [].concat((0, _toConsumableArray2.default)(namePath), [index]);
|
|
406
|
-
row = form.getFieldValue(rowPath);
|
|
407
|
-
orgRow = (0, _lodash.cloneDeep)(row);
|
|
408
405
|
for (_len3 = _args3.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
409
406
|
args[_key3] = _args3[_key3];
|
|
410
407
|
}
|
|
411
|
-
_args = formatArgs(args);
|
|
408
|
+
_args = formatArgs([].concat(args));
|
|
409
|
+
rowPath = [].concat((0, _toConsumableArray2.default)(namePath), [index]);
|
|
410
|
+
row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
|
|
411
|
+
orgRow = (0, _lodash.cloneDeep)(row);
|
|
412
412
|
_args[1] = row;
|
|
413
413
|
_context2.t0 = (_TargetComponent3 = TargetComponent) === null || _TargetComponent3 === void 0 ? void 0 : (_TargetComponent3$pro = _TargetComponent3.props) === null || _TargetComponent3$pro === void 0 ? void 0 : _TargetComponent3$pro.onBlur;
|
|
414
414
|
if (!_context2.t0) {
|
|
@@ -448,14 +448,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
448
448
|
cellNamePath: []
|
|
449
449
|
});
|
|
450
450
|
case 20:
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
});
|
|
458
|
-
}
|
|
451
|
+
// 单行编辑时需要 强制更新视图
|
|
452
|
+
setState({
|
|
453
|
+
forceUpdate: {
|
|
454
|
+
d: Date.now()
|
|
455
|
+
}
|
|
456
|
+
});
|
|
459
457
|
case 21:
|
|
460
458
|
case "end":
|
|
461
459
|
return _context2.stop();
|
|
@@ -14,7 +14,8 @@ var getRandom = exports.getRandom = function getRandom() {
|
|
|
14
14
|
var difference = exports.difference = function difference(object, base) {
|
|
15
15
|
var changes = function changes(object, base) {
|
|
16
16
|
return (0, _lodash.transform)(object, function (result, value, key) {
|
|
17
|
-
|
|
17
|
+
var _key$indexOf;
|
|
18
|
+
if ((key === null || key === void 0 ? void 0 : (_key$indexOf = key.indexOf) === null || _key$indexOf === void 0 ? void 0 : _key$indexOf.call(key, '-')) > -1) {
|
|
18
19
|
result[key] = true;
|
|
19
20
|
} else if (!(0, _lodash.isEqual)(value, base[key])) {
|
|
20
21
|
result[key] = (0, _lodash.isObject)(value) && (0, _lodash.isObject)(base[key]) ? changes(value, base[key]) : value;
|