feat: 添加注册页面,更新路由配置和表单验证逻辑

This commit is contained in:
2025-12-20 21:56:36 +07:00
parent e8278fa957
commit 2e42bbc278
5 changed files with 63 additions and 5 deletions

View File

@@ -111,7 +111,7 @@ onUnmounted(() => {
<template>
<Form :validation-schema="schema" class="mt-5" @submit="handleSubmit">
<Field v-slot="{ field, errors }" name="email" type="email">
<Field v-slot="{ field, errorMessage }" name="email" type="email">
<div class="mb-4">
<ui-input
v-bind="field"
@@ -137,8 +137,8 @@ onUnmounted(() => {
</span>
</ion-button>
</ui-input>
<div v-if="errors[0] || emailError" class="text-xs text-red-500 mt-1">
{{ errors[0] || emailError }}
<div v-if="errorMessage || emailError" class="text-xs text-red-500 mt-1">
{{ errorMessage || emailError }}
</div>
</div>
</Field>