js 深拷贝代码实现
export function deepClone(obj) { let result = typeof obj.splice === "function" ? [] : {};//obj为list时typeof obj.splice为'function',为对象时typeof obj.splice为'undefined' if (obj && typeof obj === "object") { for (let key in obj) { if (obj[ke
转载
2020-12-09 10:57:59 ·
90 阅读 ·
0 评论