JavaScript 对象深拷贝

可以采用JSON序列化的方式

const obj = JSON.parse(JSON.stringify(state));
posted @ 2020-12-09 20:23  Toream学习笔记  阅读(61)  评论(0)    收藏  举报