--- name: vue3-element-admin description: Develop, maintain, refactor, and review the vue3-element-admin frontend, including Vue pages, API modules, stores, routes, menus, permissions, caching, i18n, and project components. Use only in the vue3-element-admin repository or when the user explicitly asks to follow its conventions; do not apply these project-specific patterns to unrelated Vue applications. --- # vue3-element-admin 开发 为 `vue3-element-admin` 提供项目专用约定。目标:可维护、类型安全、与现有代码一致。 ## 边界 仅在本仓库或用户明确要求遵循时使用。冲突时优先级:用户请求 → 仓库实际代码与检查 → 本 Skill → 通用惯例。维护既有模块沿用相邻实现,不为套示例改写架构。 ## 工作流程 1. 确认范围:读相关配置、目标文件与同目录实现,保留用户未提交的修改。 2. 做最小且完整的改动,复用已有 API、类型、Composables、组件与样式变量。 3. 按风险验证:至少类型检查与修改文件的 lint;涉及构建配置、路由或依赖时再跑构建。 4. 交付时说明改动、验证结果与未验证事项,不掩盖失败或既有问题。 不自动修复或格式化整个仓库;这类操作会改动无关文件。 ## 按需读取参考文档 | 场景 | 读取 | | --- | --- | | 新增或重构 API、列表页、表单页、简单页面 | [new-page-guide.md](references/new-page-guide.md) | | 配置驱动 CRUD(`src/components/Crud`:`CrudSearch`/`CrudTable`/`CrudModal` + `useCrudPage`) | [crud-development.md](references/crud-development.md) | | 静态路由、动态菜单、路由 Meta | [router-menu.md](references/router-menu.md) | | `v-hasPerm`、`hasPerm()`、权限标识 | [permission.md](references/permission.md) | | `keepAlive`、标签页缓存与刷新 | [page-caching.md](references/page-caching.md) | | 菜单标题、语言包与语言切换 | [i18n.md](references/i18n.md) | | `settings.ts`、环境变量、存储键、主题 | [project-config.md](references/project-config.md) | | Upload、Dict、TableSelect、IconSelect | [components.md](references/components.md) | | 注释形式(JSDoc / `//`)与文案取舍 | [comments.md](references/comments.md) | 页面模式按 new-page-guide.md 的表选择:新增默认 Composables,维护时保留原模式,不因行数迁移模式或强行拆分。页面根节点沿用 `page-container`,搜索、内容、工具栏复用 `page-search`、`page-content`、`page-toolbar` 等全局样式。 ## 项目约定 ### Vue 与组件 - Composition API + `