mirror of
https://github.com/jumpserver/lina.git
synced 2025-10-21 23:59:22 +00:00
fix(userCreateUpdate): 修复创建用户时生成密码的问题
This commit is contained in:
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user