diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..2fe28ee --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,485 @@ +# 交互规范 + +1、使用中文交互 + +--- + +# 项目架构概览 + +## 技术栈 + + +| 层级 | 技术 | +| --------- | ---------------------------- | +| 框架 | Vue 3 + TypeScript 5 | +| 构建 | Vite 4 | +| UI 组件库 | Ant Design Vue 3 | +| 状态管理 | Pinia 2 | +| 路由 | Vue Router 4 | +| HTTP | Axios(自定义封装`defHttp`) | +| 样式 | Less + Windi CSS | +| 国际化 | Vue I18n 9 | +| 基础框架 | Vben Admin(深度定制) | +| 包管理 | pnpm | + +> 注意:本项目与 Vue 3.4.x 不兼容,请保持 Vue ~3.3.4。 + +--- + +## 目录结构 + +``` +src/ +├── api/ # HTTP 请求模块,按业务域分组 +│ └── / +│ └── / +│ ├── index.ts # 请求函数 +│ └── model/ # 请求/响应 TS 类型 +├── assets/ # 静态资源、全局样式 +├── components/ # 可复用组件(BasicTable、BasicForm、Modal 等) +├── design/ # 全局 Less 主题入口 +├── hooks/ # 组合式函数(composables) +├── layouts/ # 布局组件(header、sider、tabs) +├── locales/ # i18n 配置 +├── router/ # 路由配置、守卫 +├── store/ # Pinia 状态模块 +│ └── modules/ # app / user / permission / locale / lock / multipleTab +├── utils/ # 工具函数 +│ └── http/axios/ # HTTP 封装核心 +└── views/ # 业务页面,按业务域分组 + └── / # erp / system / workflow / contract / sales ... +``` + +--- + +## 路径别名 + + +| 别名 | 指向 | +| --------- | --------------------------------- | +| `/@/` | `src/` | +| `/#/` | `types/` | +| `/@bpmn/` | `src/views/workflow/design/bpmn/` | + +**始终使用别名,禁止使用相对路径 `../../`。** + +--- + +# 代码规范 + +## 1. Vue 组件 + +### 新文件优先使用 ` +``` + +存量代码中存在 `defineComponent` 写法,维护时保持原有风格,新增代码统一用 ` +``` + +--- + +## 5. 样式规范 + +- 组件内样式:`