# 前端项目架构设计文档 (DESIGN) ## 任务名称 frontend-vue3 ## 整体架构图 ```mermaid graph TB subgraph "前端应用 (Vue3)" A[App.vue] --> B[Vue Router] B --> C1[Models 模型管理] B --> C2[KnowledgeBase 知识库] B --> C3[Conversations 对话列表] B --> C4[Chat 聊天页] B --> C5[Agent 执行页] C1 --> D1[API: models.js] C2 --> D2[API: kb.js] C3 --> D3[API: conversations.js] C4 --> D3 C5 --> D4[API: agent.js] D1 --> E[Axios Client] D2 --> E D3 --> E D4 --> E end E -->|HTTP Request| F[FastAPI Backend
:8000/api/v1] subgraph "公共层" G[Error Handler
错误拦截器] H[Loading State
加载状态] I[Message Tips
消息提示] end E --> G E --> H E --> I style A fill:#e1f5fe style E fill:#fff3e0 style F fill:#f3e5f5 style G fill:#ffebee style H fill:#e8f5e9 style I fill:#fff9c4 ``` ## 系统分层设计 ### 1. 展示层 (Views) **职责**: 页面渲染、用户交互、状态展示 **核心页面**: - `Models.vue`: 模型管理页 - `KnowledgeBase.vue`: 知识库管理页 - `Conversations.vue`: 对话列表页 - `Chat.vue`: 聊天界面 - `Agent.vue`: Agent 执行页 **页面设计规范**: - 使用 Composition API (`