用变量做对象的属性名

用一个对象(this.currentData)的属性名(code)对应的值作为另一个对象(editForm )属性名

let editForm = {} 
editForm[this.currentData["code"]] = this.newValue;
this.$api.aaa(editForm)
posted @ 2021-12-23 13:02  一只橙蚊镜  阅读(101)  评论(0)    收藏  举报