diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index bb1ca1a3..ef726bc5 100644 --- a/src/views/system/tenant/index.vue +++ b/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',