弃用lodash

This commit is contained in:
fofolee
2024-12-30 20:41:54 +08:00
parent 7a79d3a443
commit 1d3aa3c9ae
30 changed files with 597 additions and 152 deletions

View File

@@ -33,10 +33,10 @@ const isPathMatched = (currentPath, targetPaths) => {
* @returns {Object} 处理后的对象
*/
const removeEmptyValues = (obj) => {
return _.omitBy(obj, (value) => {
if (_.isNil(value) || value === "") return true;
return window.lodashM.omitBy(obj, (value) => {
if (window.lodashM.isNil(value) || value === "") return true;
if (typeof value === "object")
return _.isEmpty(removeEmptyValues(value));
return window.lodashM.isEmpty(removeEmptyValues(value));
return false;
});
};