@zat-design/sisyphus-react 3.14.10-beta.1 → 3.14.10-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.
@@ -152,9 +152,7 @@ function useEnum(codes, value, compose) {
152
152
  codes.forEach(code => {
153
153
  var _catchData$data2;
154
154
  var values = catchData === null || catchData === void 0 || (_catchData$data2 = catchData.data) === null || _catchData$data2 === void 0 ? void 0 : _catchData$data2[code];
155
- if (Array.isArray(values) && values.length) {
156
- _options[code] = values;
157
- }
155
+ _options[code] = Array.isArray(values) ? values : [];
158
156
  });
159
157
  return _options;
160
158
  }
@@ -272,7 +272,7 @@ var ProEnum = props => {
272
272
  return isFunction(props.optionRender) && record.length ? _optionRender() : labelList === null || labelList === void 0 ? void 0 : labelList.join(',');
273
273
  };
274
274
  if (_isView) {
275
- var __value = value || _defalutValue;
275
+ var __value = value !== null && value !== void 0 ? value : _defalutValue;
276
276
  if (Array.isArray(__value)) {
277
277
  return /*#__PURE__*/_jsx(Container, {
278
278
  tooltip: true,
@@ -159,9 +159,7 @@ function useEnum(codes, value, compose) {
159
159
  codes.forEach(code => {
160
160
  var _catchData$data2;
161
161
  var values = catchData === null || catchData === void 0 || (_catchData$data2 = catchData.data) === null || _catchData$data2 === void 0 ? void 0 : _catchData$data2[code];
162
- if (Array.isArray(values) && values.length) {
163
- _options[code] = values;
164
- }
162
+ _options[code] = Array.isArray(values) ? values : [];
165
163
  });
166
164
  return _options;
167
165
  }
@@ -279,7 +279,7 @@ var ProEnum = props => {
279
279
  return (0, _lodash.isFunction)(props.optionRender) && record.length ? _optionRender() : labelList === null || labelList === void 0 ? void 0 : labelList.join(',');
280
280
  };
281
281
  if (_isView) {
282
- var __value = value || _defalutValue;
282
+ var __value = value !== null && value !== void 0 ? value : _defalutValue;
283
283
  if (Array.isArray(__value)) {
284
284
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
285
285
  tooltip: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.14.10-beta.1",
3
+ "version": "3.14.10-beta.4",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": ">=18.19.0"