You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.9 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 项目vue-mgt-template - 个人项目代码记录系统
## 项目概述
本系统为个人代码记录与总结实践平台,采用后台管理系统模式集成开发。
- **框架核心**:基于 vue-pure-admin 精简版 (文档: https://pure-admin.cn/pages/introduction/)
- **后端交互**:纯前端项目,不包含后端代码,接口使用 Mock 数据或本地文件。
## 🛠 技术栈规范
- **核心框架**: Vue 3 (Script Setup), TypeScript
- **构建工具**: Vite 5, pnpm
- **状态管理**: Pinia (配合 pinia-plugin-persistedstate)
- **UI 组件**: Element Plus, TailwindCSS, SCSS
- **代码规范**: ESLint (v9), Prettier, Stylelint
- **图标方案**: Iconify, SVG
## 📂 项目结构
```text
vue3-mgt-template/
├── .env* # 环境变量配置
├── mock/ # Mock 数据接口
├── public/ # 静态资源
├── src/
│ ├── api/ # 接口定义
│ ├── assets/ # 静态资源
│ ├── components/ # 全局组件 (PascalCase)
│ ├── directives/ # 自定义指令
│ ├── hooks/ # Composables
│ ├── layout/ # 布局组件
│ ├── router/ # 路由配置
│ ├── store/ # Pinia 状态库
│ ├── style/ # 全局样式
│ ├── utils/ # 工具函数
│ └── views/ # 页面组件
└── types/ # TS 类型定义
```
## 🚀 常用命令 (Scripts)
- **启动开发**: `pnpm dev` (或 `pnpm serve`)
- **生产构建**: `pnpm build`
- **代码检查**: `pnpm lint` (包含 eslint, prettier, stylelint)
- **类型检查**: `pnpm typecheck`
## 🤖 Gemini 交互与开发规范
### 核心指令
1. **中文优先**:所有沟通、代码注释、日志输出 (`console.log`)、Git Commit Message **必须**使用中文。
2. **执行流程**:在执行代码修改前,**必须**先输出思路Plan待用户确认Approve后再执行。
3. **代码修改**
- **增量原则**:优先通过新增代码实现功能。
- **修改限制**:原则上不修改现有逻辑,**除非**是明确的 Bug 修复或用户要求的重构。禁止随意删除现有注释。
4. **文档记录**
- 结束会话前,**必须**将本次核心变动以“本次会话总结”格式更新到 `README.md` 的“对话记录”部分。
- 尽可能为新代码添加详细的中文文档和注释。
### 代码风格
- **TypeScript**: 严格模式,避免 `any`
- **命名规范**:
- 组件文件: `PascalCase` (如 `TaskCard.vue`)
- 变量/函数: `camelCase` (如 `getUserInfo`)
- 常量: `UPPER_SNAKE_CASE` (如 `MAX_COUNT`)
- **多平台兼容**: 确保代码在 macOS, Windows, Linux 下均可运行。
## 📝 开发任务
> 符号说明:[x] 已完成, [-] 已取消, [ ] 待执行
### 任务列表
- [ ] (在此处添加新任务)