for(var key in this.billList){
//是否是billList自己身上的key
if(this.billList.hasOwnProperty(key)){
this.newList = Object.defineProperty(this.billList,this.time(key),Object.getOwnPropertyDescriptor(this.billList,key))
delete this.newList[key]
}
}
参考1:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
参考2:https://blog.csdn.net/starwavelin/article/details/75270572
网友评论