添加用户

This commit is contained in:
xing 2020-06-18 17:00:37 +08:00
parent 2b94112e48
commit 522526a02b

View File

@ -142,11 +142,17 @@ export default {
this.resetForm()
},
submitForm () {
this.$refs.addFormRef.validate(validate => {
this.$refs.addFormRef.validate(async validate => {
if (!validate) {
return
}
const { data: res } = await this.$http.post('users', this.addForm)
if (res.meta.status !== 201) {
return this.$message.error(res.meta.msg)
}
this.$message.success(res.meta.msg)
this.dialogVisible = false
await this.getUserList()
})
},
resetForm () {