@signalplus/params-about 1.0.16 → 1.0.17-alpha
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.
- package/lib/es/index.js +9 -5
- 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-
|
|
4
|
-
* Version: 1.0.
|
|
3
|
+
* Generated: 2024-04-19
|
|
4
|
+
* Version: 1.0.17-alpha
|
|
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]) ?
|
|
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
|
});
|
|
@@ -2534,11 +2534,12 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
2534
2534
|
key: 'textNumberList',
|
|
2535
2535
|
Comp: TextValueList,
|
|
2536
2536
|
validator: function validator($val) {
|
|
2537
|
+
console.log('$val=============', $val);
|
|
2537
2538
|
if (!($val === null || $val === void 0 ? void 0 : $val.length)) return '';
|
|
2538
2539
|
|
|
2539
2540
|
for (var i = 0; i < $val.length; i++) {
|
|
2540
2541
|
var val = $val[i];
|
|
2541
|
-
if (
|
|
2542
|
+
if (isEmpty(val.key) && isNullLike(val.value)) return '';
|
|
2542
2543
|
|
|
2543
2544
|
if (isNullLike(val.key) && !isNullLike(val.value)) {
|
|
2544
2545
|
return emptyErrText(i, 'key');
|
|
@@ -2807,7 +2808,10 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
|
|
|
2807
2808
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (changed, data) {
|
|
2808
2809
|
var _this$props$onChange, _this$props;
|
|
2809
2810
|
|
|
2810
|
-
|
|
2811
|
+
var $data = Array.isArray(data) ? data.filter(function (it) {
|
|
2812
|
+
return !!it.key;
|
|
2813
|
+
}) : data;
|
|
2814
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, $data);
|
|
2811
2815
|
if ('valueType' in changed) _this.forceUpdate();
|
|
2812
2816
|
});
|
|
2813
2817
|
|