删除对象中的元素的方法

this.copyData = Object.assign({}, this.$route.params.data, {
  id: undefined,
  code: undefined,
  createTime: undefined,
  statusDesc: undefined,
})
将对象中的属性设置为undefined相当于删除
posted @ 2018-07-05 14:53  哆啦a梦爱吃铜锣烧  阅读(361)  评论(0编辑  收藏  举报