@zat-design/sisyphus-react 3.13.14-beta.3 → 3.13.14-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.
@@ -35,7 +35,7 @@ import ConfirmWrapper from './ConfirmWrapper';
|
|
35
35
|
import ChangedWrapper from './ChangedWrapper';
|
36
36
|
// 这个组件只管渲染, 参数的整理在外部处理
|
37
37
|
var Render = function Render(props) {
|
38
|
-
var _ref2, _ref3, _ref4, _ref5, _otherProps$
|
38
|
+
var _ref2, _ref3, _ref4, _ref5, _otherProps$names3;
|
39
39
|
var component = props.component,
|
40
40
|
originComponent = props.originComponent,
|
41
41
|
_props$formItemProps = props.formItemProps,
|
@@ -447,9 +447,19 @@ var Render = function Render(props) {
|
|
447
447
|
});
|
448
448
|
}
|
449
449
|
if (diffConfig === null || diffConfig === void 0 ? void 0 : diffConfig.originalValues) {
|
450
|
+
var _otherProps$namePath, _otherProps$names2;
|
451
|
+
var _names = otherProps.names;
|
452
|
+
// FormList中的names字段需要去除前缀
|
453
|
+
if ((otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$namePath = otherProps.namePath) === null || _otherProps$namePath === void 0 ? void 0 : _otherProps$namePath.length) && ((_otherProps$names2 = otherProps.names) === null || _otherProps$names2 === void 0 ? void 0 : _otherProps$names2.length)) {
|
454
|
+
var _otherProps$namePath2;
|
455
|
+
var prefixLength = (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$namePath2 = otherProps.namePath) === null || _otherProps$namePath2 === void 0 ? void 0 : _otherProps$namePath2.length) - 1;
|
456
|
+
_names = otherProps.names.map(function (name) {
|
457
|
+
return name.slice(prefixLength);
|
458
|
+
});
|
459
|
+
}
|
450
460
|
child = _jsx(ChangedWrapper, {
|
451
461
|
name: formItemProps.name,
|
452
|
-
names:
|
462
|
+
names: _names,
|
453
463
|
namesStr: namesStr,
|
454
464
|
diffConfig: diffConfig,
|
455
465
|
form: form,
|
@@ -482,7 +492,7 @@ var Render = function Render(props) {
|
|
482
492
|
return renderItem();
|
483
493
|
}
|
484
494
|
})
|
485
|
-
}) : renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$
|
495
|
+
}) : renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$names3 = otherProps.names) === null || _otherProps$names3 === void 0 ? void 0 : _otherProps$names3.length) ? otherProps.names.map(function (name) {
|
486
496
|
return _jsx(_Form.Item, {
|
487
497
|
hidden: true,
|
488
498
|
name: name,
|
@@ -42,7 +42,7 @@ var _excluded = ["labelWidth", "hiddenNames", "trim", "upperCase", "className",
|
|
42
42
|
/* eslint-disable prefer-destructuring */
|
43
43
|
// 这个组件只管渲染, 参数的整理在外部处理
|
44
44
|
var Render = function Render(props) {
|
45
|
-
var _ref2, _ref3, _ref4, _ref5, _otherProps$
|
45
|
+
var _ref2, _ref3, _ref4, _ref5, _otherProps$names3;
|
46
46
|
var component = props.component,
|
47
47
|
originComponent = props.originComponent,
|
48
48
|
_props$formItemProps = props.formItemProps,
|
@@ -454,9 +454,19 @@ var Render = function Render(props) {
|
|
454
454
|
});
|
455
455
|
}
|
456
456
|
if (diffConfig === null || diffConfig === void 0 ? void 0 : diffConfig.originalValues) {
|
457
|
+
var _otherProps$namePath, _otherProps$names2;
|
458
|
+
var _names = otherProps.names;
|
459
|
+
// FormList中的names字段需要去除前缀
|
460
|
+
if ((otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$namePath = otherProps.namePath) === null || _otherProps$namePath === void 0 ? void 0 : _otherProps$namePath.length) && ((_otherProps$names2 = otherProps.names) === null || _otherProps$names2 === void 0 ? void 0 : _otherProps$names2.length)) {
|
461
|
+
var _otherProps$namePath2;
|
462
|
+
var prefixLength = (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$namePath2 = otherProps.namePath) === null || _otherProps$namePath2 === void 0 ? void 0 : _otherProps$namePath2.length) - 1;
|
463
|
+
_names = otherProps.names.map(function (name) {
|
464
|
+
return name.slice(prefixLength);
|
465
|
+
});
|
466
|
+
}
|
457
467
|
child = (0, _jsxRuntime.jsx)(_ChangedWrapper.default, {
|
458
468
|
name: formItemProps.name,
|
459
|
-
names:
|
469
|
+
names: _names,
|
460
470
|
namesStr: namesStr,
|
461
471
|
diffConfig: diffConfig,
|
462
472
|
form: form,
|
@@ -489,7 +499,7 @@ var Render = function Render(props) {
|
|
489
499
|
return renderItem();
|
490
500
|
}
|
491
501
|
})
|
492
|
-
}) : renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$
|
502
|
+
}) : renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$names3 = otherProps.names) === null || _otherProps$names3 === void 0 ? void 0 : _otherProps$names3.length) ? otherProps.names.map(function (name) {
|
493
503
|
return (0, _jsxRuntime.jsx)(_form.default.Item, {
|
494
504
|
hidden: true,
|
495
505
|
name: name,
|