소스 검색

fix: 新增用户

xingyu4j 2 년 전
부모
커밋
4fc342c0a7
1개의 변경된 파일19개의 추가작업 그리고 0개의 파일을 삭제
  1. 19 0
      yudao-ui-admin-vue3/src/views/system/user/index.vue

+ 19 - 0
yudao-ui-admin-vue3/src/views/system/user/index.vue

@@ -346,6 +346,25 @@ const handleCreate = async () => {
   // 重置表单
   deptId.value = null
   postIds.value = []
+  await nextTick()
+  if (allSchemas.formSchema[0].field !== 'username') {
+    unref(formRef)?.addSchema(
+      {
+        field: 'username',
+        label: '用户账号',
+        component: 'Input'
+      },
+      0
+    )
+    unref(formRef)?.addSchema(
+      {
+        field: 'password',
+        label: '用户密码',
+        component: 'InputPassword'
+      },
+      1
+    )
+  }
 }
 
 // 修改操作