perf: 账号创建更新优化

This commit is contained in:
feng
2023-04-04 16:03:52 +08:00
parent b6235ec7dd
commit 19b2b55051

View File

@@ -100,12 +100,14 @@ export default {
})
this.iVisible = iVisible
if (!iVisible) {
this.$store.commit('common/reload')
this.$emit('add', true)
}
},
editAccount(form) {
const data = { ...form }
this.$axios.patch(`/api/v1/accounts/accounts/${this.account.id}/`, data).then(() => {
this.iVisible = false
this.$emit('add', true)
this.$message.success(this.$tc('common.updateSuccessMsg'))
}).catch(error => this.setFieldError(error))
},