Files
YG_FT/frontend/README.md
caoxiaozhu 855308e5fa chore: 初始化前端项目脚手架与构建配置
Vue 3 + TypeScript + Vite 工程配置,包含 package.json、tsconfig、vite.config.ts 及 .gitignore(忽略 node_modules/dist/自动生成类型声明)。
2026-07-10 16:44:23 +08:00

67 lines
2.0 KiB
Markdown
Raw Permalink 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
> 由原 `web/` 静态多页面 HTML 项目改造而来。
## 技术栈
- **Vue 3** + **TypeScript** + **Vite**
- **Vue Router 4** - 路由
- **Pinia** - 状态管理
- **Element Plus** - UI 组件库(主色 `#1890ff`
- **axios** - HTTP 请求
- **Chart.js** - 训练曲线图表
- **marked + DOMPurify** - Markdown 渲染
- **md-editor-v3** - Prompt 编辑器
- **@vueuse/core** - 组合式工具
## 快速开始
```bash
cd frontend
npm install
npm run dev
```
开发服务器默认运行在 `http://localhost:6801`
后端 API 默认通过 Vite 代理转发到 `http://localhost:7861`(见 `vite.config.ts`)。
## 构建
```bash
npm run build # 类型检查 + 生产构建,产物在 dist/
npm run preview # 本地预览构建产物
npm run type-check # 仅类型检查
```
## 目录结构
```
src/
├── api/ # axios 封装 + 各业务模块 API
├── components/ # 公共组件(侧边栏、顶部栏、通用列表等)
├── composables/ # 组合式函数(流式对话、图表、轮询等)
├── constants/ # 常量与映射表
├── layouts/ # 主布局
├── router/ # 路由配置 + 登录守卫
├── stores/ # Pinia 状态auth/system/models/tools
├── styles/ # 全局样式与主题
├── types/ # TypeScript 类型定义
└── views/ # 页面视图
├── login/ # 登录
├── fine-tune/ # 模型调优
├── eval/ # 模型评测
├── inference/ # 模型推理
├── compare/ # 模型对比
├── model/ # 模型管理
├── dataset/ # 数据集
├── tools/ # 其他工具
└── system/ # 平台性能 / 日志
```
## 与原 web/ 项目的关系
-`web/` 目录**保留不动**,作为功能对照参照。
- 新前端位于 `frontend/`,新旧可并存。
- 后端 API 端点完全不变,仅前端实现方式改为 Vue SPA。