diff options
| author | shu <nvcsadjkojf@outlook.com> | 2026-09-06 19:13:10 +0800 |
|---|---|---|
| committer | shu <nvcsadjkojf@outlook.com> | 2026-09-06 19:13:10 +0800 |
| commit | 61c1674e439dd791aee4fdc72e5738bbefed13e9 (patch) | |
| tree | e2e7bff86a0ee15d99b3cebd50f45bce28b74bd1 | |
| parent | 879872ac238682ceb01f2fc5c0a261fc10572bb6 (diff) | |
统一路由页面文件的 page 前缀与命名规范
- 将首页、关于概览、关于我、表单和 UI Kit 页面改为 page- 前缀的小写横线文件名
- 同步重命名页面 CSS Modules,并更新组件样式引用
- 更新静态路由导入与懒加载路径,保持访问地址和页面行为不变
- 在代理约定中补充文件名称使用小写英文加横线的规范
验证:pnpm build、pnpm lint 和暂存区空白检查均通过。
| -rw-r--r-- | agents.md | 3 | ||||
| -rw-r--r-- | src/page-about-me.tsx (renamed from src/Me.tsx) | 0 | ||||
| -rw-r--r-- | src/page-about.tsx (renamed from src/About.tsx) | 0 | ||||
| -rw-r--r-- | src/page-form.module.css (renamed from src/FormExample.module.css) | 0 | ||||
| -rw-r--r-- | src/page-form.tsx (renamed from src/FormExample.tsx) | 2 | ||||
| -rw-r--r-- | src/page-home.tsx (renamed from src/App.tsx) | 0 | ||||
| -rw-r--r-- | src/page-ui-kit.module.css (renamed from src/UiKit.module.css) | 0 | ||||
| -rw-r--r-- | src/page-ui-kit.tsx (renamed from src/UiKit.tsx) | 2 | ||||
| -rw-r--r-- | src/routes.ts | 10 |
9 files changed, 9 insertions, 8 deletions
@@ -1,3 +1,4 @@ # AI Agent -- 使用详细中文提交代码
\ No newline at end of file +- 使用详细中文提交代码 +- 文件名称使用小写英文加横线的方式
\ No newline at end of file diff --git a/src/Me.tsx b/src/page-about-me.tsx index ab1d02f..ab1d02f 100644 --- a/src/Me.tsx +++ b/src/page-about-me.tsx diff --git a/src/About.tsx b/src/page-about.tsx index 21b4c1e..21b4c1e 100644 --- a/src/About.tsx +++ b/src/page-about.tsx diff --git a/src/FormExample.module.css b/src/page-form.module.css index 913f3f9..913f3f9 100644 --- a/src/FormExample.module.css +++ b/src/page-form.module.css diff --git a/src/FormExample.tsx b/src/page-form.tsx index 631bf53..c203193 100644 --- a/src/FormExample.tsx +++ b/src/page-form.tsx @@ -27,7 +27,7 @@ import { } from '@mantine/core' import { isEmail, useForm } from '@mantine/form' import { UploadSimpleIcon } from '@phosphor-icons/react' -import classes from './FormExample.module.css' +import classes from './page-form.module.css' // 仅用于演示联动,不是完整行政区划数据。 const regions = [ diff --git a/src/App.tsx b/src/page-home.tsx index 8b213e6..8b213e6 100644 --- a/src/App.tsx +++ b/src/page-home.tsx diff --git a/src/UiKit.module.css b/src/page-ui-kit.module.css index a0df9f0..a0df9f0 100644 --- a/src/UiKit.module.css +++ b/src/page-ui-kit.module.css diff --git a/src/UiKit.tsx b/src/page-ui-kit.tsx index 8d89788..156718b 100644 --- a/src/UiKit.tsx +++ b/src/page-ui-kit.tsx @@ -10,7 +10,7 @@ import { useTimeout } from '@mantine/hooks' import { createNotificationsStore, Notifications, notifications } from '@mantine/notifications' import { CheckIcon, HeartIcon, InfoIcon, PlusIcon, WarningIcon } from '@phosphor-icons/react' import '@mantine/notifications/styles.css' -import classes from './UiKit.module.css' +import classes from './page-ui-kit.module.css' function Section({ title, children }: { title: string; children: ReactNode }) { return ( diff --git a/src/routes.ts b/src/routes.ts index 92eced8..dc351e0 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -1,9 +1,9 @@ import { ClipboardTextIcon, HouseIcon, InfoIcon, SquaresFourIcon, UserIcon } from '@phosphor-icons/react' import type { Icon } from '@phosphor-icons/react' import type { RouteObject } from 'react-router' -import App from './App.tsx' -import About from './About.tsx' -import Me from './Me.tsx' +import App from './page-home.tsx' +import About from './page-about.tsx' +import Me from './page-about-me.tsx' export type PageRoute = RouteObject & { handle?: { title: string; icon: Icon } @@ -20,13 +20,13 @@ export const pageRoutes = [ { id: 'form', path: '/form', - lazy: async () => ({ Component: (await import('./FormExample.tsx')).default }), + lazy: async () => ({ Component: (await import('./page-form.tsx')).default }), handle: { title: '表单示例', icon: ClipboardTextIcon }, }, { id: 'ui-kit', path: '/ui-kit', - lazy: async () => ({ Component: (await import('./UiKit.tsx')).default }), + lazy: async () => ({ Component: (await import('./page-ui-kit.tsx')).default }), handle: { title: 'UI Kit', icon: SquaresFourIcon }, }, { |
