@zat-design/sisyphus-react 3.4.3-beta.2 → 3.4.3-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.
@@ -2696,7 +2696,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2696
2696
  .pro-form .ant-form-item.pro-form-item-changed .ant-input-number .ant-select-selection-placeholder {
2697
2697
  z-index: 9;
2698
2698
  }
2699
- .pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control:has(.ant-switch-handle, .ant-checkbox-wrapper-in-form-item) {
2699
+ .pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control:has(.ant-switch-handle),
2700
+ .pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control:has(.ant-checkbox-wrapper-in-form-item) {
2700
2701
  background: var(--zaui-contract-bg, #fffaa1);
2701
2702
  border-radius: 4px;
2702
2703
  }
package/dist/less.esm.css CHANGED
@@ -2696,7 +2696,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2696
2696
  .pro-form .ant-form-item.pro-form-item-changed .ant-input-number .ant-select-selection-placeholder {
2697
2697
  z-index: 9;
2698
2698
  }
2699
- .pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control:has(.ant-switch-handle, .ant-checkbox-wrapper-in-form-item) {
2699
+ .pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control:has(.ant-switch-handle),
2700
+ .pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control:has(.ant-checkbox-wrapper-in-form-item) {
2700
2701
  background: var(--zaui-contract-bg, #fffaa1);
2701
2702
  border-radius: 4px;
2702
2703
  }
@@ -154,9 +154,9 @@ var Render = function Render(props) {
154
154
  // ↑↑↑↑↑↑ formItem参数整理 ↑↑↑↑↑↑
155
155
  Object.assign(otherFormItemProps, transforms, {
156
156
  names: otherProps.names
157
- }, internalRule, labelRequired || _required ? {
158
- required: labelRequired || _required
159
- } : null, otherProps.isView && !requiredOnView ? {
157
+ }, internalRule, {
158
+ required: typeof labelRequired === 'boolean' ? labelRequired : _required
159
+ }, otherProps.isView && !requiredOnView ? {
160
160
  required: false
161
161
  } : null, _objectSpread({}, isTrim(type, trim, useProConfig())), // 优先取传进来的,其次取ProConfigProvider配置的
162
162
  _objectSpread({}, isUpperCase(type, upperCase)), {
@@ -244,7 +244,7 @@ var Render = function Render(props) {
244
244
  * onChange参数重置 (value, record, { form, index, namePath, option }) => void
245
245
  */
246
246
  var handleChange = function handleChange() {
247
- var _lastComponentProps$c2;
247
+ var _otherFormItemProps$n3, _lastComponentProps$c2;
248
248
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
249
249
  args[_key] = arguments[_key];
250
250
  }
@@ -262,6 +262,11 @@ var Render = function Render(props) {
262
262
  ((_AutoComponent$props$ = (_AutoComponent$props = AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props)[changeKey]) === null || _AutoComponent$props$ === void 0 ? void 0 : _AutoComponent$props$.call.apply(_AutoComponent$props$, [_AutoComponent$props].concat(_toConsumableArray(_args)))) || ((_lastComponentProps$c = lastComponentProps[changeKey]) === null || _lastComponentProps$c === void 0 ? void 0 : _lastComponentProps$c.call.apply(_lastComponentProps$c, [lastComponentProps].concat(_toConsumableArray(_args))));
263
263
  return false;
264
264
  }
265
+ var inList = _otherFormItemProps === null || _otherFormItemProps === void 0 ? void 0 : (_otherFormItemProps$n3 = _otherFormItemProps.namePath) === null || _otherFormItemProps$n3 === void 0 ? void 0 : _otherFormItemProps$n3.length;
266
+ // FormList 和 Group场景 对比值改变的话, 回显到表单上
267
+ if (inList) {
268
+ form.setFieldsValue(_args[1]);
269
+ }
265
270
  // Group默认校验, 延时与重新setFieldValue,为了解决校验值未同步最新的问题,
266
271
  if (formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames) {
267
272
  setTimeout(function () {
@@ -132,7 +132,8 @@
132
132
  }
133
133
  }
134
134
 
135
- .ant-form-item-control:has(.ant-switch-handle, .ant-checkbox-wrapper-in-form-item) {
135
+ .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-switch-handle),
136
+ .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-checkbox-wrapper-in-form-item) {
136
137
  background: @zaui-contract-bg;
137
138
  border-radius: 4px;
138
139
  }
@@ -140,13 +141,13 @@
140
141
  // 地址组件
141
142
  .@{ant-prefix}-form-item-control-input-content {
142
143
  & > .pro-address {
143
- .ant-select-selector,
144
- .ant-input-affix-wrapper,
145
- .ant-input-disabled {
144
+ .@{ant-prefix}-select-selector,
145
+ .@{ant-prefix}-input-affix-wrapper,
146
+ .@{ant-prefix}-input-disabled {
146
147
  background: @zaui-contract-bg;
147
148
  }
148
149
  }
149
- & > .ant-input-group {
150
+ & > .@{ant-prefix}-input-group {
150
151
  .forever-checkbox {
151
152
  background: @zaui-contract-bg;
152
153
  }
@@ -42,7 +42,7 @@ export var useControlled = function useControlled(props) {
42
42
  export var isSelect = function isSelect(props) {
43
43
  var dataSource = props.dataSource,
44
44
  type = props.type;
45
- return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProAddressBar', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload'].includes(type);
45
+ return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProAddressBar', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload', 'TimePicker'].includes(type);
46
46
  };
47
47
  /**
48
48
  * Input TextArea 移除前后空格
@@ -152,9 +152,9 @@ var Render = function Render(props) {
152
152
  // ↑↑↑↑↑↑ formItem参数整理 ↑↑↑↑↑↑
153
153
  Object.assign(otherFormItemProps, transforms, {
154
154
  names: otherProps.names
155
- }, internalRule, labelRequired || _required ? {
156
- required: labelRequired || _required
157
- } : null, otherProps.isView && !requiredOnView ? {
155
+ }, internalRule, {
156
+ required: typeof labelRequired === 'boolean' ? labelRequired : _required
157
+ }, otherProps.isView && !requiredOnView ? {
158
158
  required: false
159
159
  } : null, (0, _objectSpread2.default)({}, (0, _index.isTrim)(type, trim, (0, _ProConfigProvider.useProConfig)())), // 优先取传进来的,其次取ProConfigProvider配置的
160
160
  (0, _objectSpread2.default)({}, (0, _index.isUpperCase)(type, upperCase)), {
@@ -242,7 +242,7 @@ var Render = function Render(props) {
242
242
  * onChange参数重置 (value, record, { form, index, namePath, option }) => void
243
243
  */
244
244
  var handleChange = function handleChange() {
245
- var _lastComponentProps$c2;
245
+ var _otherFormItemProps$n3, _lastComponentProps$c2;
246
246
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
247
247
  args[_key] = arguments[_key];
248
248
  }
@@ -260,6 +260,11 @@ var Render = function Render(props) {
260
260
  ((_AutoComponent$props$ = (_AutoComponent$props = AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props)[changeKey]) === null || _AutoComponent$props$ === void 0 ? void 0 : _AutoComponent$props$.call.apply(_AutoComponent$props$, [_AutoComponent$props].concat((0, _toConsumableArray2.default)(_args)))) || ((_lastComponentProps$c = lastComponentProps[changeKey]) === null || _lastComponentProps$c === void 0 ? void 0 : _lastComponentProps$c.call.apply(_lastComponentProps$c, [lastComponentProps].concat((0, _toConsumableArray2.default)(_args))));
261
261
  return false;
262
262
  }
263
+ var inList = _otherFormItemProps === null || _otherFormItemProps === void 0 ? void 0 : (_otherFormItemProps$n3 = _otherFormItemProps.namePath) === null || _otherFormItemProps$n3 === void 0 ? void 0 : _otherFormItemProps$n3.length;
264
+ // FormList 和 Group场景 对比值改变的话, 回显到表单上
265
+ if (inList) {
266
+ form.setFieldsValue(_args[1]);
267
+ }
263
268
  // Group默认校验, 延时与重新setFieldValue,为了解决校验值未同步最新的问题,
264
269
  if (formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames) {
265
270
  setTimeout(function () {
@@ -132,7 +132,8 @@
132
132
  }
133
133
  }
134
134
 
135
- .ant-form-item-control:has(.ant-switch-handle, .ant-checkbox-wrapper-in-form-item) {
135
+ .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-switch-handle),
136
+ .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-checkbox-wrapper-in-form-item) {
136
137
  background: @zaui-contract-bg;
137
138
  border-radius: 4px;
138
139
  }
@@ -140,13 +141,13 @@
140
141
  // 地址组件
141
142
  .@{ant-prefix}-form-item-control-input-content {
142
143
  & > .pro-address {
143
- .ant-select-selector,
144
- .ant-input-affix-wrapper,
145
- .ant-input-disabled {
144
+ .@{ant-prefix}-select-selector,
145
+ .@{ant-prefix}-input-affix-wrapper,
146
+ .@{ant-prefix}-input-disabled {
146
147
  background: @zaui-contract-bg;
147
148
  }
148
149
  }
149
- & > .ant-input-group {
150
+ & > .@{ant-prefix}-input-group {
150
151
  .forever-checkbox {
151
152
  background: @zaui-contract-bg;
152
153
  }
@@ -58,7 +58,7 @@ var useControlled = exports.useControlled = function useControlled(props) {
58
58
  var isSelect = exports.isSelect = function isSelect(props) {
59
59
  var dataSource = props.dataSource,
60
60
  type = props.type;
61
- return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProAddressBar', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload'].includes(type);
61
+ return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProAddressBar', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload', 'TimePicker'].includes(type);
62
62
  };
63
63
  /**
64
64
  * Input TextArea 移除前后空格
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.4.3-beta.2",
3
+ "version": "3.4.3-beta.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",