From 3779fc2f7a67dc4700aa6a6b7eb7e2ee6e5c1f6c Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期六, 01 六月 2024 17:00:53 +0800
Subject: [PATCH] 打印模板

---
 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