This commit is contained in:
dap
2024-12-17 08:01:02 +08:00
101 changed files with 853 additions and 193 deletions

View File

@@ -15,6 +15,7 @@ import { useAuthStore } from '#/store';
defineOptions({ name: 'CodeLogin' });
const loading = ref(false);
const CODE_LENGTH = 6;
const tenantInfo = ref<TenantResp>({
tenantEnabled: false,
@@ -98,7 +99,9 @@ const formSchema = computed((): VbenFormSchema[] => {
},
fieldName: 'code',
label: $t('authentication.code'),
rules: z.string().min(1, { message: $t('authentication.codeTip') }),
rules: z.string().length(CODE_LENGTH, {
message: $t('authentication.codeTip', [CODE_LENGTH]),
}),
},
];
});