Commit 4fc342c0a7ed36cc9275cc27a5d9cb427674afa6
1 parent
144488cb
fix: 新增用户
Showing
1 changed file
with
19 additions
and
0 deletions
yudao-ui-admin-vue3/src/views/system/user/index.vue
| @@ -346,6 +346,25 @@ const handleCreate = async () => { | @@ -346,6 +346,25 @@ const handleCreate = async () => { | ||
| 346 | // 重置表单 | 346 | // 重置表单 |
| 347 | deptId.value = null | 347 | deptId.value = null |
| 348 | postIds.value = [] | 348 | postIds.value = [] |
| 349 | + await nextTick() | ||
| 350 | + if (allSchemas.formSchema[0].field !== 'username') { | ||
| 351 | + unref(formRef)?.addSchema( | ||
| 352 | + { | ||
| 353 | + field: 'username', | ||
| 354 | + label: '用户账号', | ||
| 355 | + component: 'Input' | ||
| 356 | + }, | ||
| 357 | + 0 | ||
| 358 | + ) | ||
| 359 | + unref(formRef)?.addSchema( | ||
| 360 | + { | ||
| 361 | + field: 'password', | ||
| 362 | + label: '用户密码', | ||
| 363 | + component: 'InputPassword' | ||
| 364 | + }, | ||
| 365 | + 1 | ||
| 366 | + ) | ||
| 367 | + } | ||
| 349 | } | 368 | } |
| 350 | 369 | ||
| 351 | // 修改操作 | 370 | // 修改操作 |