这种代码如何优化,不想要这么多变量,但是每个变量都会用到

getTableData(row) {
      this.name = row.name;
      this.sex = row.sex;
      this.person = row.person;
      this.age = row.age;
      this.type = row.type;
      this.status = row.status;
      this.like = row.like;
      this.date = row.date;
      this.children = row.children;
      this.dress = row.dress;

}

 

这种写法你必须知道row对象的属性

getTableData(row) {

this.row=row;

}