2026-09-04 10:22:37 +08:00

23 lines
743 B
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.

# 前端架构
前端采用 Vue 3 组合式 API 和按职责分层的单页应用架构。
```text
Page / Component
-> composables 页面用例组合
-> stores Pinia 全局状态
-> services 响应解包和业务调用
-> api Axios 与后端端点
-> backend
```
- `layouts`:应用整体布局。
- `pages`:路由页面,只编排组件和状态。
- `components`:布局、通用和风险领域组件。
- `stores`:跨页面状态、加载态和错误态。
- `services`:面向业务的接口,隔离 HTTP 响应结构。
- `api`:Axios 实例和 REST 请求定义。
- `types`:API 与领域类型。
- `styles`:设计变量、重置和全局样式。