深拷贝转化为浅拷贝方法

1.转化为字符串

2.object.assign({},obj)

3.深层遍历赋值

4.es6语法中的扩展运算符{...obj}

posted @ 2019-06-25 14:43  sweeeper  阅读(406)  评论(0编辑  收藏  举报