@signalplus/params-about 1.0.16 → 1.0.18

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.
Files changed (2) hide show
  1. package/lib/es/index.js +8 -5
  2. package/package.json +1 -1
package/lib/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Bundle of @signalplus/params-about
3
- * Generated: 2024-04-17
4
- * Version: 1.0.16
3
+ * Generated: 2024-04-22
4
+ * Version: 1.0.18
5
5
  * License: MIT
6
6
  * Author: 2631541504@qq.com
7
7
  */
@@ -1620,7 +1620,7 @@ var TextValueList = /*#__PURE__*/function (_PureComponent) {
1620
1620
  key: ''
1621
1621
  };
1622
1622
  if (key) value[i][key] = val;else value[i] = _objectSpread2(_objectSpread2({}, value[i]), val);
1623
- (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value.length === 1 && _this.isEmptyItem(value[0]) ? undefined : value.filter(function (it) {
1623
+ (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value.filter(function (it) {
1624
1624
  return !!it.key;
1625
1625
  }));
1626
1626
  });
@@ -2538,7 +2538,7 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
2538
2538
 
2539
2539
  for (var i = 0; i < $val.length; i++) {
2540
2540
  var val = $val[i];
2541
- if (isNullLike(val.key) && isNullLike(val.value)) return '';
2541
+ if (isEmpty(val.key) && isNullLike(val.value)) return '';
2542
2542
 
2543
2543
  if (isNullLike(val.key) && !isNullLike(val.value)) {
2544
2544
  return emptyErrText(i, 'key');
@@ -2807,7 +2807,10 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
2807
2807
  _defineProperty(_assertThisInitialized(_this), "onChange", function (changed, data) {
2808
2808
  var _this$props$onChange, _this$props;
2809
2809
 
2810
- (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, data);
2810
+ var $data = Array.isArray(data) ? data.filter(function (it) {
2811
+ return !!it.key;
2812
+ }) : data;
2813
+ (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, $data);
2811
2814
  if ('valueType' in changed) _this.forceUpdate();
2812
2815
  });
2813
2816
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalplus/params-about",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "A description for the module",
5
5
  "main": "./lib/umd/index.js",
6
6
  "module": "./lib/es/index.js",