test-frontend/README.md

41 lines
1.4 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.

# ghb-base 前端ghb-frontend
> 这是 **ghb-base 基础框架**的前端(管理后台)。以后每个新系统都基于本框架开发。
> 基于 JeecgBoot 3.9.2 前端精简。
## 技术栈
- Vue 3 + Vite + TypeScript
- Ant Design Vue
- 包管理器:**pnpm**
## 环境要求
- Node.js 18+、pnpm
## 第一次启动
```bash
pnpm install
pnpm dev
```
- 开发服务器由 Vite 启动;接口走代理到后端(默认后端 `http://localhost:8080/ghb`)。
- **先启动后端再启动前端。** 后端地址在 `.env.development` / `vite.config.ts` 代理配置里调整。
## 构建
```bash
pnpm build # 生产构建
pnpm preview # 预览构建产物
pnpm lint # ESLint
pnpm stylelint # 样式检查
```
## 新人必读(开始写代码前全部读完)
1. **`CLAUDE.md`**(本目录)/ base 根 `../CLAUDE.md` — AI 开发总纲
2. **`../.claude/frontend.md`** — 样式/命名/注释/组件铁律/页面模板/检查表
3. **`../.claude/contract.md`** — 接口契约与返回格式
4. **`../contract/`** — 接口契约(独立 git submodule调接口前先看
## 铁律速记(详见 .claude/frontend.md
- 颜色/字号/间距禁硬编码,走主题变量/全局类(无裸 `color:#`、无裸字号)
- 组件、命名按规范;类名别过长
- 接口返回判成败看统一返回格式的 code不依赖 message 文案
- 改后端接口 → 先更新 `contract/`,前后端同步