Forráskód Böngészése

重置vxe会导致新增表单无限增加用户名和密码

gexinzhineng/gxzn27 2 éve
szülő
commit
615ae3d651
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      src/views/system/tenant/index.vue

+ 5 - 1
src/views/system/tenant/index.vue

@@ -128,7 +128,11 @@ const handleCreate = async () => {
   setDialogTile('create')
   await nextTick()
   console.log(allSchemas.formSchema, 'allSchemas.formSchema')
-  if (allSchemas.formSchema[4].field !== 'username') {
+  let haveUser = allSchemas.formSchema.filter((res) => {
+    return res.field == 'username'
+  })
+  if (haveUser.length == 0) {
+    // if (allSchemas.formSchema[4].field !== 'username') {
     unref(formRef)?.addSchema(
       {
         field: 'username',