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
2021-07-25 05:24:48
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