Files
digital-psychology/apps/docs/standards/05-h5-vue.md
T
jackyu66gitandCursor 2fb1dfee14 chore: seal Design Vision v1 and monorepo scaffold
Archive the differentiated YuXinGu product docs, AI engineering system,
design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity
over early innovation (see .ai/product/STRATEGY.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:00:44 +08:00

42 lines
817 B
Markdown

# 05 H5 / Vue 规范
适用:`apps/user-h5``apps/admin-h5`
## 栈
Vue 3 + TypeScript + Vite + Vue Router + Pinia。
## 目录
```
src/
components/
pages/
layouts/
hooks/
api/ # 仅薄封装 → @yuxingu/sdk
stores/
utils/
router/
assets/
```
## 组件命名
- 文件与组件名:`PascalCase`,如 `UserCard.vue``OrderTable.vue`
- 禁止:`usercard.vue``aaa.vue`
## 数据请求
- 页面 / 组件内禁止直接 `fetch`/`axios` 拼完整 URL。
-`src/api/*``@yuxingu/sdk`
## 风格
- 移动优先;品牌色见 `packages/ui` token。
- 单文件建议 ≤ 300 行,复杂页拆子组件与 composable(`hooks/`)。
## 路由
- 与产品 5 Tab 对齐:`/` `explore` `ask` `companion` `mine`;二级页如 `/decode``/scales/:slug`