@zat-design/sisyphus-react 3.3.0-beta.13 → 3.3.0-beta.14

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.
@@ -145,13 +145,13 @@ var ActionButton = function ActionButton(props) {
145
145
  align: "start",
146
146
  className: "pro-form-list-action",
147
147
  children: actionProps === null || actionProps === void 0 ? void 0 : actionProps.map(function (item) {
148
- if (item.show === false) return _jsx(_Fragment, {});
148
+ if (item.show === false) return _jsx("span", {}, "".concat(item === null || item === void 0 ? void 0 : item.actionType).concat(index));
149
149
  if (isFunction(item.show) && !item.show(form.getFieldValue(namePath), {
150
150
  namePath: namePath,
151
151
  index: index,
152
152
  form: form
153
153
  })) {
154
- return _jsx(_Fragment, {});
154
+ return _jsx("span", {}, "".concat(item === null || item === void 0 ? void 0 : item.actionType).concat(index));
155
155
  }
156
156
  var label = item.label,
157
157
  onClick = item.onClick,
@@ -62,7 +62,7 @@ var FormList = function FormList(props, ref) {
62
62
  var handleDragEnd = function handleDragEnd(drag) {
63
63
  var active = drag.active,
64
64
  over = drag.over;
65
- if (active.id !== over.id) {
65
+ if (_fields.length > 1 && active.id !== over.id) {
66
66
  var activeIndex = _fields.findIndex(function (item) {
67
67
  return item.key === active.id;
68
68
  });
@@ -367,7 +367,9 @@ var Render = function Render(props) {
367
367
  if (type === 'FormList') {
368
368
  lastComponentProps.disabled = lastDisabled;
369
369
  var lessMode = lastComponentProps.mode === 'less';
370
- child = _jsx(_Form.List, _objectSpread(_objectSpread({}, _otherFormItemProps), {}, {
370
+ child = _jsx(_Form.List, _objectSpread(_objectSpread({
371
+ name: _otherFormItemProps.name
372
+ }, omit(_otherFormItemProps, ['rules'])), {}, {
371
373
  children: function children(fields, operation, meta) {
372
374
  return _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps, ['onFieldChange', 'disabledStrictly'])), {}, {
373
375
  otherProps: otherProps,
@@ -146,13 +146,13 @@ var ActionButton = function ActionButton(props) {
146
146
  align: "start",
147
147
  className: "pro-form-list-action",
148
148
  children: actionProps === null || actionProps === void 0 ? void 0 : actionProps.map(function (item) {
149
- if (item.show === false) return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
149
+ if (item.show === false) return (0, _jsxRuntime.jsx)("span", {}, "".concat(item === null || item === void 0 ? void 0 : item.actionType).concat(index));
150
150
  if ((0, _lodash.isFunction)(item.show) && !item.show(form.getFieldValue(namePath), {
151
151
  namePath: namePath,
152
152
  index: index,
153
153
  form: form
154
154
  })) {
155
- return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
155
+ return (0, _jsxRuntime.jsx)("span", {}, "".concat(item === null || item === void 0 ? void 0 : item.actionType).concat(index));
156
156
  }
157
157
  var label = item.label,
158
158
  onClick = item.onClick,
@@ -68,7 +68,7 @@ var FormList = function FormList(props, ref) {
68
68
  var handleDragEnd = function handleDragEnd(drag) {
69
69
  var active = drag.active,
70
70
  over = drag.over;
71
- if (active.id !== over.id) {
71
+ if (_fields.length > 1 && active.id !== over.id) {
72
72
  var activeIndex = _fields.findIndex(function (item) {
73
73
  return item.key === active.id;
74
74
  });
@@ -365,7 +365,9 @@ var Render = function Render(props) {
365
365
  if (type === 'FormList') {
366
366
  lastComponentProps.disabled = lastDisabled;
367
367
  var lessMode = lastComponentProps.mode === 'less';
368
- child = (0, _jsxRuntime.jsx)(_antd.Form.List, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _otherFormItemProps), {}, {
368
+ child = (0, _jsxRuntime.jsx)(_antd.Form.List, (0, _objectSpread2.default)((0, _objectSpread2.default)({
369
+ name: _otherFormItemProps.name
370
+ }, (0, _lodash.omit)(_otherFormItemProps, ['rules'])), {}, {
369
371
  children: function children(fields, operation, meta) {
370
372
  return (0, _jsxRuntime.jsx)(AutoComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(lastComponentProps, ['onFieldChange', 'disabledStrictly'])), {}, {
371
373
  otherProps: otherProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.0-beta.13",
3
+ "version": "3.3.0-beta.14",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",