@signalplus/params-about 0.1.15 → 0.1.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.
- package/lib/es/index.js +6 -4
- 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
3
|
* Generated: 2022-04-10
|
|
4
|
-
* Version: 0.1.
|
|
4
|
+
* Version: 0.1.18
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -2154,16 +2154,18 @@ var ParamMover = /*#__PURE__*/function (_PureComponent) {
|
|
|
2154
2154
|
var _getFieldsValue = this.ref.current.getFieldsValue(),
|
|
2155
2155
|
parentId = _getFieldsValue.parentId;
|
|
2156
2156
|
|
|
2157
|
+
var targetParams = this.props.targetParams.map(String);
|
|
2158
|
+
|
|
2157
2159
|
var filter = function filter(it) {
|
|
2158
|
-
return !
|
|
2160
|
+
return !targetParams.includes(String(it.$paramId));
|
|
2159
2161
|
};
|
|
2160
2162
|
|
|
2161
2163
|
var map = function map(it) {
|
|
2162
2164
|
var _it$children3;
|
|
2163
2165
|
|
|
2164
|
-
if (it.$paramId === parentId) {
|
|
2166
|
+
if (String(it.$paramId) === String(parentId)) {
|
|
2165
2167
|
return _objectSpread2(_objectSpread2({}, it), {}, {
|
|
2166
|
-
children: (it.children || []).concat(_this2.props.targetParams.map(function ($paramId) {
|
|
2168
|
+
children: (it.children || []).filter(filter).map(map).concat(_this2.props.targetParams.map(function ($paramId) {
|
|
2167
2169
|
return _objectSpread2(_objectSpread2({}, _this2.state.paramsMap[$paramId]), {}, {
|
|
2168
2170
|
parentId: it.$paramId
|
|
2169
2171
|
});
|