showEditDialog (userInfo) {
this.editForm.loginAcct = userInfo.loginAcct
this.editForm.email = userInfo.email
this.editForm.telephone = userInfo.telephone
this.editDialogVisible = true
},
editDialogClose () {
this.$refs.editForm.resetFields()
}
这是行为区
<el-form :model="editForm" :rules="editRules" ref="editForm" label-width="70px">
v-model获取的是对象,只跟值有关,而ref获取到的是为了操作Dom对象,可以使用$refs来操作