@zat-design/sisyphus-react 3.7.0-beta.1 → 3.7.0
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.
|
@@ -91,9 +91,6 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
|
91
91
|
// 忽略清洗的 codes
|
|
92
92
|
ignoreCodes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 ? void 0 : _useRequest$options.ignoreCodes) || [];
|
|
93
93
|
Object.keys(response).forEach(function (key) {
|
|
94
|
-
if (!response[key] || !Array.isArray(response[key])) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
94
|
var options = _toConsumableArray(response[key]) || [];
|
|
98
95
|
if (ignoreCodes.includes(key)) {
|
|
99
96
|
response[key] = options;
|
|
@@ -74,7 +74,7 @@ export function cacheFieldNames(fieldNames, dataSource) {
|
|
|
74
74
|
});
|
|
75
75
|
// 递归去对数据进行清洗
|
|
76
76
|
if (children && Array.isArray(dataSource[children])) {
|
|
77
|
-
result
|
|
77
|
+
result[children] = dataSource[children].map(function (item) {
|
|
78
78
|
return cacheFieldNames(fieldNames, item);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -98,9 +98,6 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
|
98
98
|
// 忽略清洗的 codes
|
|
99
99
|
ignoreCodes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 ? void 0 : _useRequest$options.ignoreCodes) || [];
|
|
100
100
|
Object.keys(response).forEach(function (key) {
|
|
101
|
-
if (!response[key] || !Array.isArray(response[key])) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
101
|
var options = (0, _toConsumableArray2.default)(response[key]) || [];
|
|
105
102
|
if (ignoreCodes.includes(key)) {
|
|
106
103
|
response[key] = options;
|
|
@@ -87,7 +87,7 @@ function cacheFieldNames(fieldNames, dataSource) {
|
|
|
87
87
|
});
|
|
88
88
|
// 递归去对数据进行清洗
|
|
89
89
|
if (children && Array.isArray(dataSource[children])) {
|
|
90
|
-
result
|
|
90
|
+
result[children] = dataSource[children].map(function (item) {
|
|
91
91
|
return cacheFieldNames(fieldNames, item);
|
|
92
92
|
});
|
|
93
93
|
}
|