From f03b5c7ea42074b0aa6f6836301f20deefb64813 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期一, 03 六月 2024 11:42:47 +0800
Subject: [PATCH] 1
---
HTML_09/js/public.js | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/HTML_09/js/public.js b/HTML_09/js/public.js
index 7b8cf0d..baf1024 100644
--- a/HTML_09/js/public.js
+++ b/HTML_09/js/public.js
@@ -264,4 +264,21 @@
});
});
}
-}
\ No newline at end of file
+}
+//娣辨嫹璐�
+function deepClone(source) {
+ if (typeof source !== 'object' || source == null) {
+ return source;
+ }
+ const target = Array.isArray(source) ? [] : {};
+ for (const key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ if (typeof source[key] === 'object' && source[key] !== null) {
+ target[key] = deepClone(source[key]);
+ } else {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target;
+}
\ No newline at end of file
--
Gitblit v1.8.0