@zat-design/sisyphus-react 3.4.2-beta.22 → 3.4.2-beta.23

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.
@@ -43,15 +43,17 @@ var FormList = function FormList(props, ref) {
43
43
  names: item === null || item === void 0 ? void 0 : item.names,
44
44
  prefixNamePath: namePath
45
45
  })] : [fieldName].concat(_toConsumableArray(toArray(item.name)));
46
- return _objectSpread(_objectSpread({}, item), {}, {
46
+ var column = _objectSpread(_objectSpread({}, item), {}, {
47
47
  name: _name,
48
48
  names: (item === null || item === void 0 ? void 0 : item.names) ? item.names.map(function (nameItem) {
49
- return [].concat(_toConsumableArray(namePath), _toConsumableArray(toArray(nameItem)));
49
+ // 传给Group的names会被渲染成真实FormItem 不能传完整name
50
+ return item.type === 'Group' ? [fieldName].concat(_toConsumableArray(toArray(nameItem))) : [].concat(_toConsumableArray(namePath), _toConsumableArray(toArray(nameItem)));
50
51
  }) : item.names,
51
52
  index: fieldName,
52
53
  namePath: namePath,
53
54
  label: mode === 'less' ? undefined : item.label
54
55
  });
56
+ return column;
55
57
  });
56
58
  }, [columns]);
57
59
  useImperativeHandle(ref, function () {
@@ -49,15 +49,17 @@ var FormList = function FormList(props, ref) {
49
49
  names: item === null || item === void 0 ? void 0 : item.names,
50
50
  prefixNamePath: namePath
51
51
  })] : [fieldName].concat((0, _toConsumableArray2.default)((0, _utils.toArray)(item.name)));
52
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
52
+ var column = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
53
53
  name: _name,
54
54
  names: (item === null || item === void 0 ? void 0 : item.names) ? item.names.map(function (nameItem) {
55
- return [].concat((0, _toConsumableArray2.default)(namePath), (0, _toConsumableArray2.default)((0, _utils.toArray)(nameItem)));
55
+ // 传给Group的names会被渲染成真实FormItem 不能传完整name
56
+ return item.type === 'Group' ? [fieldName].concat((0, _toConsumableArray2.default)((0, _utils.toArray)(nameItem))) : [].concat((0, _toConsumableArray2.default)(namePath), (0, _toConsumableArray2.default)((0, _utils.toArray)(nameItem)));
56
57
  }) : item.names,
57
58
  index: fieldName,
58
59
  namePath: namePath,
59
60
  label: mode === 'less' ? undefined : item.label
60
61
  });
62
+ return column;
61
63
  });
62
64
  }, [columns]);
63
65
  (0, _react.useImperativeHandle)(ref, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.4.2-beta.22",
3
+ "version": "3.4.2-beta.23",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",