样式和代码结构调整
This commit is contained in:
@@ -18,8 +18,16 @@ import personal from './_assets/personal.webp'
|
||||
import step1 from './_assets/step1.webp'
|
||||
import step2 from './_assets/step2.webp'
|
||||
import step3 from './_assets/step3.webp'
|
||||
import {Card, CardContent, CardDescription, CardHeader, CardTitle} from '@/components/ui/card'
|
||||
import {CheckCircle, CheckCircleIcon, WorkflowIcon} from 'lucide-react'
|
||||
import {Card, CardContent, CardHeader, CardTitle} from '@/components/ui/card'
|
||||
import {CheckCircleIcon, WorkflowIcon} from 'lucide-react'
|
||||
|
||||
const schema = zod.object({
|
||||
type: zod.enum([`personal`, `enterprise`], {errorMap: () => ({message: `请选择认证类型`})}).default('personal'),
|
||||
name: zod.string().min(2, {message: `姓名至少2个字符`}),
|
||||
iden_no: zod.string().length(18, {message: `身份证号码必须为18位`}),
|
||||
})
|
||||
|
||||
type Schema = zod.infer<typeof schema>
|
||||
|
||||
export type IdentifyPageProps = {}
|
||||
|
||||
@@ -28,13 +36,6 @@ export default function IdentifyPage(props: IdentifyPageProps) {
|
||||
// 填写信息
|
||||
// ======================
|
||||
|
||||
const schema = zod.object({
|
||||
type: zod.enum([`personal`, `enterprise`], {errorMap: () => ({message: `请选择认证类型`})}).default('personal'),
|
||||
name: zod.string().min(2, {message: `姓名至少2个字符`}),
|
||||
iden_no: zod.string().length(18, {message: `身份证号码必须为18位`}),
|
||||
})
|
||||
type Schema = zod.infer<typeof schema>
|
||||
|
||||
const form = useForm<Schema>({
|
||||
resolver: zodResolver(schema),
|
||||
defaultValues: {
|
||||
|
||||
Reference in New Issue
Block a user