aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/routes.ts
diff options
context:
space:
mode:
authorshu <nvcsadjkojf@outlook.com>2026-09-06 17:39:46 +0800
committershu <nvcsadjkojf@outlook.com>2026-09-06 17:39:46 +0800
commitfb14fbe0a3ecc801f010a7a429e30ddc57d9f2e4 (patch)
treed01f9bccc5beac11bbabaf07abfe367f8e9d6e8c /src/routes.ts
parent2f1057a9d9d51d0e657c1203d3781173e8efc611 (diff)
新增 Mantine 表单示例页面及输入校验演示
- 添加 /form 路由和表单示例菜单,通过路由懒加载拆分页面资源 - 展示文本、密码、数值、多行文本、单选、复选、开关、颜色和文件选择控件 - 使用 Cascader 展示省市区级联选择,支持搜索、清空和移动端路径列表 - 添加 MultiSelect 下拉多选与 TagsInput 自定义标签输入 - 接入 Mantine 表单状态、提交预览和重置,预览隐藏密码并仅显示文件元信息 - 添加必填标识、邮箱错误状态与提示,以及示例协议阅读和同意校验 - 将文件名换行样式封装为 CSS Module 验证:pnpm build、pnpm lint、git diff --check 均通过。
Diffstat (limited to 'src/routes.ts')
-rw-r--r--src/routes.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/routes.ts b/src/routes.ts
index 83f97b6..f0a0ef8 100644
--- a/src/routes.ts
+++ b/src/routes.ts
@@ -1,4 +1,4 @@
-import { HouseIcon, InfoIcon, UserIcon } from '@phosphor-icons/react'
+import { ClipboardTextIcon, HouseIcon, InfoIcon, UserIcon } from '@phosphor-icons/react'
import type { Icon } from '@phosphor-icons/react'
import type { RouteObject } from 'react-router'
import App from './App.tsx'
@@ -18,6 +18,12 @@ export const pageRoutes = [
handle: { title: '首页', icon: HouseIcon },
},
{
+ id: 'form',
+ path: '/form',
+ lazy: async () => ({ Component: (await import('./FormExample.tsx')).default }),
+ handle: { title: '表单示例', icon: ClipboardTextIcon },
+ },
+ {
id: 'about',
path: '/about',
handle: { title: '关于', icon: InfoIcon },