1. es6实现:
const deepClone=(obj)=>{
var proto=Object.getPrototypeOf(obj);
return Object.assign({},Object.create(proto),obj);
}
原文链接:https://www.f2er.com/note/413524.htmlconst deepClone=(obj)=>{
var proto=Object.getPrototypeOf(obj);
return Object.assign({},Object.create(proto),obj);
}
原文链接:https://www.f2er.com/note/413524.html