JavaScript中关于深拷贝的使用
作者:互联网
1. JSON.parse(JSON.stringify(vue)) 2. MessageChannel function deepCopy(obj) { return new Promise((resolve) => { const {port1, port2} = new MessageChannel(); port2.onmessage = ev => resolve(ev.data); port1.postMessage(obj); }); } 3. Lodash
标签:resolve,JavaScript,JSON,关于,new,拷贝,ev,port2,port1 来源: https://www.cnblogs.com/wanan-happy/p/15838207.html