// 按钮
<button @click="editForm(scope.row,scope.$index,tableDate)">编辑</button>
editForm(index, row, tableData) {
this.ruleForm.updateData = JSON.parse(JSON.stringify(this.ruleForm)); //先JSON.stringfy再JSON.parse
this.ruleForm.updateData.treeId = tableData[index].treeId
this.ruleForm.updateData.treeName = tableData[index].treeName
this.ruleForm.updateData.treeSource = tableData[index].treeSource
this.ruleForm.updateData.treeSex = tableData[index].treeSex
this.ruleForm.updateData.treeTel = tableData[index].treeTel
this.ruleForm.updateData.treeEmail = tableData[index].treeEmail
this.ruleForm.updateData.treeAddress = tableData[index].treeAddress
}
vue 表单回显数据
于 2022-09-21 16:48:11 首次发布