From c1765373914b72a69ac24dca33250b7dc5019465 Mon Sep 17 00:00:00 2001 From: maven <2163098428@qq.com> Date: 星期三, 13 八月 2025 16:27:49 +0800 Subject: [PATCH] yys 新增劳保管理 --- src/utils/util.js | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/utils/util.js b/src/utils/util.js index 78846dc..fd3ef75 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -86,7 +86,21 @@ 'aplication/zip': 'zpi', } } - + export const deepCopySameProperties = (source, target) =>{ + for (const key in source) { + if (target.hasOwnProperty(key)) { + if (typeof source[key] === 'object' && source[key] !== null && + typeof target[key] === 'object' && target[key] !== null) { + // 閫掑綊澶勭悊瀵硅薄 + deepCopySameProperties(source[key], target[key]); + } else { + // 鍩烘湰绫诲瀷鐩存帴璧嬪�� + target[key] = source[key]; + } + } + } + return target; +} export function filterArr(arr) { return arr.filter(item => item.flag !== false); } \ No newline at end of file -- Gitblit v1.9.3