<el-button size="mini" type="danger" @click="editor(scope.row)">编辑</el-button>
editor(row) {
this.dialogTableVisible = true;
this.id = row.id;
var item = this.tableData[this.id - 1];
this.form.name = item.name;
this.form.mobi = item.mobi;
this.form.account = item.account;
this.form.line = item.line;
}

第二种写法
<el-button size="mini" type="danger" @click="editor(scope.row)">编辑</el-button>
editor(row) {
this.dialogTableVisible = true;
this.id = row.id;
this.$axios({
url: api/index.php/admin/mod/' + this.id,
method: 'post'
}).then(res => {
// console.log(res.data.name);
var item = res.data;
this.form.name = item.name;
this.form.mobi = item.mobi;
this.form.account = item.account;
this.form.line = item.line;
}).catch(err => {
console.log(err)
})
}

相关文章:

  • 2021-07-31
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
相关资源
相似解决方案