fix: handle potential undefined role_setting in UserDrawer component
This commit is contained in:
parent
4711527222
commit
95be524066
@ -291,13 +291,12 @@ const open = (data: any) => {
|
||||
userForm.value.password = data.password
|
||||
userForm.value.phone = data.phone
|
||||
userForm.value.nick_name = data.nick_name
|
||||
list.value = data.role_setting.map((item: any) => ({
|
||||
list.value = data.role_setting?.map((item: any) => ({
|
||||
...item,
|
||||
workspace_ids: item.workspace_ids.includes('None') ? [] : item.workspace_ids,
|
||||
}))
|
||||
isEdit.value = true
|
||||
} else {
|
||||
//需要查询默认密码是啥zxl
|
||||
userManageApi.getSystemDefaultPassword().then((res: any) => {
|
||||
userForm.value.password = res.data.password
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user