Files
soul-yongping/components/README.md

23 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 组件目录说明
## 结构约定
- **移动端C 端)**`view/` — 供 `app/view/*` 使用
- `view/layout/`layout-wrapper、bottom-nav底部导航/view 前缀)
- `view/config/`config-loader
- `view/ui/`:移动端用通用 UI与 admin 各一份,按需复制)
- **管理端**`admin/` — 供 `app/admin/*` 使用
- `admin/ui/`:管理端用通用 UI与 view 各一份)
- `admin/modules/`:管理端业务组件(如 user-detail-modal 等)
- **通用组件**:若 view 与 admin 都用到(如 Button、Card、Dialog`view/ui/``admin/ui/` 各保留一份,便于两端独立样式或行为。
- **当前仍挂在根目录的组件**(如 `search-modal.tsx``chapter-content.tsx``modules/*`)主要被 `app/view/*` 引用,后续可逐步迁入 `view/` 并改为 `@/components/view/...`
## 路由约定
- 根路径 `/` → 重定向到 `/view`(移动端首页)
- 移动端:`/view``/view/chapters``/view/read/[id]``/view/match``/view/my``/view/about``/view/login`
- 管理端:`/admin``/admin/*` 不变