摘要: 方案一 function deepCopy(obj,cache = []){ // 如果为普通数据类型,则直接返回,完成拷贝 if (obj null || typeof obj !== "object"){ return obj } // cache用来储存原始值和对应拷贝数据,在递归调用deep 阅读全文
posted @ 2022-04-29 09:53 ThisCall 阅读(34) 评论(0) 推荐(0) 编辑