摘要: 旧的 1、JSON.parse(JSON.stringify(obj)) 简单易行,只能处理基本的对象、数组 2、递归 3、第三方库,如 lodash 的 _.cloneDeep 方法 4、现代深拷贝 structuredClone const kitchenSink = { set: new Se 阅读全文
posted @ 2024-09-25 12:40 似水流年ii 阅读(22) 评论(0) 推荐(0)