fix(userCreateUpdate): 修复创建用户时生成密码的问题

This commit is contained in:
jym503558564
2020-08-10 14:57:29 +08:00
committed by Orange
parent da1217972a
commit cef6521a2b

View File

@@ -87,10 +87,19 @@ export default {
},
methods: {
cleanFormValue(value) {
if (!this.password_strategy) {
const method = this.getMethod()
if (method === 'post' && !value.password_strategy) {
delete value['password']
}
return value
},
getMethod() {
const params = this.$route.params
if (params.id) {
return 'put'
} else {
return 'post'
}
}
}
}