From 8f7343c31e9a5b6a5b576b867cee1820053e5b37 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Mon, 12 May 2025 15:16:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9D=9E=E5=BF=85=E5=A1=AB=E9=82=AE?= =?UTF-8?q?=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/system/user/data.ts | 2 +- apps/web-ele/src/views/system/dept/data.ts | 2 +- apps/web-ele/src/views/system/user/data.ts | 2 +- apps/web-naive/src/views/system/dept/data.ts | 2 +- apps/web-naive/src/views/system/user/data.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/web-antd/src/views/system/user/data.ts b/apps/web-antd/src/views/system/user/data.ts index 4bcb6a62..c7d15595 100644 --- a/apps/web-antd/src/views/system/user/data.ts +++ b/apps/web-antd/src/views/system/user/data.ts @@ -83,7 +83,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'email', label: '邮箱', component: 'Input', - rules: z.string().email('邮箱格式不正确').optional(), + rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), }, { fieldName: 'mobile', diff --git a/apps/web-ele/src/views/system/dept/data.ts b/apps/web-ele/src/views/system/dept/data.ts index 1b112a59..b9eb72d6 100644 --- a/apps/web-ele/src/views/system/dept/data.ts +++ b/apps/web-ele/src/views/system/dept/data.ts @@ -95,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入邮箱', }, - rules: z.string().email('请输入正确的邮箱地址').optional(), + rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), }, { fieldName: 'status', diff --git a/apps/web-ele/src/views/system/user/data.ts b/apps/web-ele/src/views/system/user/data.ts index a16951c3..68e73756 100644 --- a/apps/web-ele/src/views/system/user/data.ts +++ b/apps/web-ele/src/views/system/user/data.ts @@ -83,7 +83,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'email', label: '邮箱', component: 'Input', - rules: z.string().email('邮箱格式不正确').optional(), + rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), }, { fieldName: 'mobile', diff --git a/apps/web-naive/src/views/system/dept/data.ts b/apps/web-naive/src/views/system/dept/data.ts index 1b112a59..b9eb72d6 100644 --- a/apps/web-naive/src/views/system/dept/data.ts +++ b/apps/web-naive/src/views/system/dept/data.ts @@ -95,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入邮箱', }, - rules: z.string().email('请输入正确的邮箱地址').optional(), + rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), }, { fieldName: 'status', diff --git a/apps/web-naive/src/views/system/user/data.ts b/apps/web-naive/src/views/system/user/data.ts index 4bcb6a62..c7d15595 100644 --- a/apps/web-naive/src/views/system/user/data.ts +++ b/apps/web-naive/src/views/system/user/data.ts @@ -83,7 +83,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'email', label: '邮箱', component: 'Input', - rules: z.string().email('邮箱格式不正确').optional(), + rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), }, { fieldName: 'mobile',