@zat-design/sisyphus-react 3.13.20-beta.2 → 3.13.20-beta.3
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.
@@ -1,6 +1,5 @@
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
2
2
|
var _excluded = ["children"];
|
3
|
-
import { isNull, isUndefined } from 'lodash';
|
4
3
|
/**
|
5
4
|
* 获取枚举数据
|
6
5
|
* @param storage
|
@@ -114,9 +113,10 @@ export function cacheFieldNames(fieldNames, dataSource) {
|
|
114
113
|
restFieldNames = _objectWithoutProperties(fieldNames, _excluded);
|
115
114
|
var result = {};
|
116
115
|
Object.keys(restFieldNames).forEach(key => {
|
117
|
-
|
118
|
-
|
119
|
-
|
116
|
+
if (![undefined, null].includes(dataSource[restFieldNames[key]])) {
|
117
|
+
result[key] = dataSource[restFieldNames[key]];
|
118
|
+
} else {
|
119
|
+
result[key] = dataSource[key];
|
120
120
|
}
|
121
121
|
});
|
122
122
|
// 递归去对数据进行清洗
|
@@ -12,7 +12,6 @@ exports.isObject = isObject;
|
|
12
12
|
exports.mergeCacheData = mergeCacheData;
|
13
13
|
exports.setEnumData = setEnumData;
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
15
|
-
var _lodash = require("lodash");
|
16
15
|
var _excluded = ["children"];
|
17
16
|
/**
|
18
17
|
* 获取枚举数据
|
@@ -127,9 +126,10 @@ function cacheFieldNames(fieldNames, dataSource) {
|
|
127
126
|
restFieldNames = (0, _objectWithoutProperties2.default)(fieldNames, _excluded);
|
128
127
|
var result = {};
|
129
128
|
Object.keys(restFieldNames).forEach(key => {
|
130
|
-
|
131
|
-
|
132
|
-
|
129
|
+
if (![undefined, null].includes(dataSource[restFieldNames[key]])) {
|
130
|
+
result[key] = dataSource[restFieldNames[key]];
|
131
|
+
} else {
|
132
|
+
result[key] = dataSource[key];
|
133
133
|
}
|
134
134
|
});
|
135
135
|
// 递归去对数据进行清洗
|