fix: 菜单管理 路由地址的必填项不生效

This commit is contained in:
dap
2025-06-04 17:53:09 +08:00
parent 14b0d9b50f
commit 0295418f79
3 changed files with 8 additions and 1 deletions

View File

@@ -238,6 +238,7 @@ export const drawerSchema: FormSchemaGetter = () => [
if (model.isFrame !== '0') {
return z
.string({ message: '请输入路由地址' })
.min(1, '请输入路由地址')
.refine((val) => !val.startsWith('/'), {
message: '路由地址不需要带/',
});