import type { DefaultTheme, LocaleSpecificConfig } from "vitepress"; export const META_URL = "http://docs.gin.elevue.easygoadmin.vip"; export const META_TITLE = "EasyGoAdmin Gin+ElementPlus 开发文档"; export const META_DESCRIPTION = "EasyGoAdmin 企业级多租户后台管理基座 - Gin + GORM + Vue3 + ElementPlus"; export const zhConfig: LocaleSpecificConfig = { description: META_DESCRIPTION, head: [ ["meta", { property: "og:url", content: META_URL }], ["meta", { property: "og:description", content: META_DESCRIPTION }], ["meta", { property: "twitter:url", content: META_URL }], ["meta", { property: "twitter:title", content: META_TITLE }], ["meta", { property: "twitter:description", content: META_DESCRIPTION }], [ "script", {}, ` var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?09709f15864acfe85b0d8edd6dabcbbc"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); `, ], ], themeConfig: { editLink: { pattern: "https://gitee.com/easygoadmin/EasyGoAdmin_Gin_EleVue", text: "对本页提出修改建议", }, outline: { label: "本页内容", }, docFooter: { prev: "上一页", next: "下一页", }, nav: [ { text: "官网", link: "https://www.easygoadmin.vip" }, { text: "授权", link: "https://www.easygoadmin.vip/goods/detail/2" }, { text: "部署文档", items: [ { text: "EasyGoAdmin混编版GoFrame+Layui版本", link: "http://docs.goframe.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离GoFrame+ElementPlus版本", link: "http://docs.goframe.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离GoFrame+AntDesign版本", link: "http://docs.goframe.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离GoFrame+NaiveUI版本", link: "http://docs.goframe.naivevue.easygoadmin.vip", }, { text: "EasyGoAdmin混编版Gin+Layui版本", link: "http://docs.gin.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Gin+ElementPlus版本", link: "http://docs.gin.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Gin+AntDesign版本", link: "http://docs.gin.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Gin+NaiveUI版本", link: "http://docs.gin.naivevue.easygoadmin.vip", }, { text: "EasyGoAdmin混编版Beego+Layui版本", link: "http://docs.beego.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Beego+ElementPlus版本", link: "http://docs.beego.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Beego+AntDesign版本", link: "http://docs.beego.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Beego+NaiveUI版本", link: "http://docs.beego.naivevue.easygoadmin.vip", }, { text: "EasyGoAdmin混编版Iris+Layui版本", link: "http://docs.iris.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Iris+ElementPlus版本", link: "http://docs.iris.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Iris+AntDesign版本", link: "http://docs.iris.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Iris+NaiveUI版本", link: "http://docs.iris.naivevue.easygoadmin.vip", }, ], }, { text: "在线演示", items: [ { text: "EasyGoAdmin混编版GoFrame+Layui版本", link: "http://manage.goframe.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离GoFrame+ElementPlus版本", link: "http://manage.goframe.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离GoFrame+AntDesign版本", link: "http://manage.goframe.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离GoFrame+NaiveUI版本", link: "http://manage.goframe.naivevue.easygoadmin.vip", }, { text: "EasyGoAdmin混编版Gin+Layui版本", link: "http://manage.gin.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Gin+ElementPlus版本", link: "http://manage.gin.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Gin+AntDesign版本", link: "http://manage.gin.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Gin+NaiveUI版本", link: "http://manage.gin.naivevue.easygoadmin.vip", }, { text: "EasyGoAdmin混编版Beego+Layui版本", link: "http://manage.beego.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Beego+ElementPlus版本", link: "http://manage.beego.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Beego+AntDesign版本", link: "http://manage.beego.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Beego+NaiveUI版本", link: "http://manage.beego.naivevue.easygoadmin.vip", }, { text: "EasyGoAdmin混编版Iris+Layui版本", link: "http://manage.iris.layui.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Iris+ElementPlus版本", link: "http://manage.iris.elevue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Iris+AntDesign版本", link: "http://manage.iris.antdvue.easygoadmin.vip", }, { text: "EasyGoAdmin前后端分离Iris+NaiveUI版本", link: "http://manage.iris.naivevue.easygoadmin.vip", }, ], }, { text: "广告赞助", link: "/zh/other/sponsor.html", }, { text: "相关链接", items: [ { text: "Gin 官网", link: "https://gin-gonic.com/zh-cn/" }, { text: "GORM 文档", link: "https://gorm.io/zh_CN/" }, { text: "Vue3 文档", link: "https://cn.vuejs.org/" }, { text: "ElementPlus", link: "https://element-plus.org/zh-CN/" }, { text: "VitePress", link: "https://vitepress.dev/zh/" }, ], }, ], sidebar: { "/zh/": [ // ================================================================ // 第 1 章:了解项目 // ================================================================ { text: "📖 1. 了解项目", collapsed: false, items: [ { text: "📄 1.1 项目介绍", link: "/zh/introduction.html" }, { text: "📄 1.2 核心特性", link: "/zh/why.html" }, { text: "📄 1.3 项目目录结构", link: "/zh/directory.html" }, { text: "📄 1.4 新手入门指南", link: "/zh/course.html" }, { text: "📄 1.5 技术栈说明", link: "/zh/tech-stack.html" }, { text: "📄 1.6 更新日志", link: "/zh/changelog.html" }, ], }, // ================================================================ // 第 2 章:快速入门 // ================================================================ { text: "🚀 2. 快速入门", collapsed: false, items: [ { text: "📄 2.1 开发环境准备", link: "/zh/quickstart/environment.html" }, { text: "📄 2.2 数据库初始化", link: "/zh/quickstart/database-init.html" }, { text: "📄 2.3 配置文件与环境变量", link: "/zh/quickstart/env-vars.html" }, { text: "📄 2.4 后端服务启动", link: "/zh/quickstart/backend-start.html" }, { text: "📄 2.5 前端服务启动", link: "/zh/quickstart/frontend-start.html" }, { text: "📄 2.6 第一个接口调试", link: "/zh/quickstart/first-api.html" }, { text: "📄 2.7 Docker 快速体验", link: "/zh/quickstart/docker.html" }, { text: "📄 2.8 常见问题 FAQ", link: "/zh/quickstart/faq.html" }, ], }, // ================================================================ // 第 3 章:模块开发实战 // ================================================================ { text: "🧪 3. 模块开发实战", collapsed: false, items: [ { text: "📄 3.1 概述与目标", link: "/zh/guide/overview.html" }, { text: "📄 3.2 数据库建表", link: "/zh/guide/database.html" }, { text: "📄 3.3 契约层开发(dto)", link: "/zh/guide/dto.html" }, { text: "📄 3.4 数据访问层(repository)", link: "/zh/guide/repository.html" }, { text: "📄 3.5 业务层开发(service)", link: "/zh/guide/service.html" }, { text: "📄 3.6 接口层开发(handler)", link: "/zh/guide/handler.html" }, { text: "📄 3.7 路由与元数据注册(RouteSpec)", link: "/zh/guide/route.html" }, { text: "📄 3.8 参数校验与错误上抛", link: "/zh/guide/validation.html" }, { text: "📄 3.9 权限节点配置", link: "/zh/guide/permission.html" }, { text: "📄 3.10 前端联调指引", link: "/zh/guide/frontend-integration.html" }, { text: "📄 3.11 完整代码清单", link: "/zh/guide/code-list.html" }, { text: "📄 3.12 常见问题与排错", link: "/zh/guide/faq.html" }, ], }, // ================================================================ // 第 4 章:架构设计 // ================================================================ { text: "🏛️ 4. 架构设计", collapsed: false, items: [ { text: "📄 5.1 整体架构概览", link: "/zh/architecture/overview.html" }, { text: "📄 5.2 请求处理链路", link: "/zh/architecture/request-flow.html" }, { text: "📄 5.3 后端分层架构", link: "/zh/architecture/backend-layer.html" }, { text: "📄 5.4 反射元数据驱动机制", link: "/zh/architecture/bind-mechanism.html" }, { text: "📄 5.5 前端分层架构", link: "/zh/architecture/frontend-layer.html" }, { text: "📄 5.6 目录结构设计", link: "/zh/architecture/directory-design.html" }, { text: "📄 5.7 基座与公共体系", link: "/zh/architecture/base-system.html" }, { text: "📄 5.8 横切机制", link: "/zh/architecture/cross-cutting.html" }, { text: "📄 5.9 缓存架构设计", link: "/zh/architecture/cache.html" }, { text: "📄 5.10 数据库设计", link: "/zh/architecture/database-design.html" }, { text: "📄 5.11 安全架构设计", link: "/zh/architecture/security.html" }, { text: "📄 5.12 扩展性设计", link: "/zh/architecture/extensibility.html" }, ], }, // ================================================================ // 第 5 章:核心功能 // ================================================================ { text: "🔐 5. 核心功能", collapsed: false, items: [ { text: "📄 认证与安全", collapsed: false, items: [ { text: "📄 5.1 用户认证(JWT)", link: "/zh/core/jwt.html" }, { text: "📄 5.2 认证与授权流程", link: "/zh/core/auth-flow.html" }, { text: "📄 5.3 验证码机制", link: "/zh/core/captcha.html" }, { text: "📄 5.4 权限管理(RBAC)", link: "/zh/core/rbac.html" }, { text: "📄 5.5 跨域配置(CORS)", link: "/zh/core/cors.html" }, { text: "📄 5.6 密码与加密服务", link: "/zh/core/password.html" }, { text: "📄 5.7 接口限流(RateLimit)", link: "/zh/core/ratelimit.html" }, { text: "📄 5.8 演示模式", link: "/zh/core/demo-mode.html" }, ], }, { text: "📄 数据与配置", collapsed: false, items: [ { text: "📄 5.9 多租户隔离", link: "/zh/core/tenant.html" }, { text: "📄 5.10 数据权限", link: "/zh/core/data-scope.html" }, { text: "📄 5.11 字典模块", link: "/zh/core/dict.html" }, { text: "📄 5.12 系统配置管理", link: "/zh/core/config.html" }, { text: "📄 5.13 系统参数管理", link: "/zh/core/param.html" }, ], }, { text: "📄 日志与监控", collapsed: false, items: [ { text: "📄 5.14 操作日志", link: "/zh/core/operation-log.html" }, { text: "📄 5.15 登录日志", link: "/zh/core/login-log.html" }, { text: "📄 5.16 异常与统一响应", link: "/zh/core/exception.html" }, { text: "📄 5.17 链路追踪与指标", link: "/zh/core/trace-metrics.html" }, { text: "📄 5.18 服务与缓存监控", link: "/zh/core/server-monitor.html" }, ], }, { text: "📄 任务调度", collapsed: false, items: [ { text: "📄 5.19 定时任务调度机制", link: "/zh/core/job-scheduler.html" }, ], }, ], }, // ================================================================ // 第 6 章:业务模块 // ================================================================ { text: "📦 6. 业务模块", collapsed: false, items: [ { text: "📄 组织与权限", collapsed: false, items: [ { text: "📄 6.1 用户管理", link: "/zh/modules/user.html" }, { text: "📄 6.2 角色管理", link: "/zh/modules/role.html" }, { text: "📄 6.3 菜单管理", link: "/zh/modules/menu.html" }, { text: "📄 6.4 部门管理", link: "/zh/modules/dept.html" }, { text: "📄 6.5 职级管理", link: "/zh/modules/level.html" }, { text: "📄 6.6 岗位管理", link: "/zh/modules/position.html" }, { text: "📄 6.7 租户管理", link: "/zh/modules/tenant.html" }, ], }, { text: "📄 内容管理", collapsed: false, items: [ { text: "📄 6.8 文章管理", link: "/zh/modules/article.html" }, { text: "📄 6.9 分类管理", link: "/zh/modules/category.html" }, { text: "📄 6.10 公告管理", link: "/zh/modules/notice.html" }, { text: "📄 6.11 友情链接管理", link: "/zh/modules/link.html" }, ], }, { text: "📄 数据与配置", collapsed: false, items: [ { text: "📄 6.12 字典管理", link: "/zh/modules/dict.html" }, { text: "📄 6.13 参数管理", link: "/zh/modules/param.html" }, { text: "📄 6.14 配置管理", link: "/zh/modules/config.html" }, { text: "📄 6.15 行政区划管理", link: "/zh/modules/city.html" }, ], }, { text: "📄 任务与监控", collapsed: false, items: [ { text: "📄 6.16 定时任务管理", link: "/zh/modules/job.html" }, { text: "📄 6.17 在线用户", link: "/zh/modules/online-user.html" }, { text: "📄 6.18 服务监控", link: "/zh/modules/server-monitor.html" }, { text: "📄 6.19 缓存监控", link: "/zh/modules/cache-monitor.html" }, { text: "📄 6.20 日志管理", link: "/zh/modules/logger.html" }, ], }, { text: "📄 文件与工具", collapsed: false, items: [ { text: "📄 6.21 文件模板管理", link: "/zh/modules/file-template.html" }, { text: "📄 6.22 示例模块(example)", link: "/zh/modules/example.html" }, { text: "📄 6.23 首页与个人中心", link: "/zh/modules/index.html" }, ], }, ], }, // ================================================================ // 第 7 章:文件处理 // ================================================================ { text: "🧰 7. 文件处理", collapsed: false, items: [ { text: "📄 7.1 文件上传全流程", link: "/zh/tools/upload.html" }, { text: "📄 7.2 上传配置详解", link: "/zh/tools/upload-config.html" }, { text: "📄 7.3 富文本处理", link: "/zh/tools/rich-text.html" }, { text: "📄 7.4 数据导入导出", link: "/zh/tools/excel.html" }, { text: "📄 7.5 前端文件组件", link: "/zh/tools/file-components.html" }, { text: "📄 7.6 数据库迁移工具", link: "/zh/tools/db-migrate.html" }, ], }, // ================================================================ // 第 8 章:接口规范与对接 // ================================================================ { text: "🔗 8. 接口规范与对接", collapsed: false, items: [ { text: "📄 8.1 统一响应格式", link: "/zh/api-spec/response.html" }, { text: "📄 8.2 错误码对照表", link: "/zh/api-spec/error-code.html" }, { text: "📄 8.3 分页查询规范", link: "/zh/api-spec/pagination.html" }, { text: "📄 8.4 请求绑定与参数校验", link: "/zh/api-spec/binding.html" }, { text: "📄 8.5 文件上传接口", link: "/zh/api-spec/upload.html" }, { text: "📄 8.6 字典数据接口", link: "/zh/api-spec/dict-api.html" }, { text: "📄 8.7 Token 使用说明", link: "/zh/api-spec/token.html" }, { text: "📄 8.8 API 接口总览", link: "/zh/api-spec/overview.html" }, ], }, // ================================================================ // 第 9 章:前端开发 // ================================================================ { text: "🖥️ 9. 前端开发", collapsed: false, items: [ { text: "📄 工程基础", collapsed: false, items: [ { text: "📄 9.1 前端工程概述", link: "/zh/frontend/overview.html" }, { text: "📄 9.2 目录结构详解", link: "/zh/frontend/directory.html" }, { text: "📄 9.3 环境与构建配置", link: "/zh/frontend/env-config.html" }, ], }, { text: "📄 核心机制", collapsed: false, items: [ { text: "📄 9.4 HTTP 请求封装", link: "/zh/frontend/http.html" }, { text: "📄 9.5 路由与动态菜单", link: "/zh/frontend/router.html" }, { text: "📄 9.6 状态管理(Pinia)", link: "/zh/frontend/store.html" }, { text: "📄 9.7 权限控制", link: "/zh/frontend/permission.html" }, { text: "📄 9.8 登录流程", link: "/zh/frontend/login.html" }, ], }, { text: "📄 公共组件", collapsed: false, items: [ { text: "📄 9.9 表格与页面组件", link: "/zh/frontend/table-components.html" }, { text: "📄 9.10 数据录入组件", link: "/zh/frontend/form-components.html" }, { text: "📄 9.11 数据展示组件", link: "/zh/frontend/display-components.html" }, { text: "📄 9.12 Excel 导入导出组件", link: "/zh/frontend/excel-components.html" }, ], }, { text: "📄 开发实践", collapsed: false, items: [ { text: "📄 9.13 新增页面开发步骤", link: "/zh/frontend/new-page.html" }, { text: "📄 9.14 API 模块编写规范", link: "/zh/frontend/api-module.html" }, { text: "📄 9.15 样式与主题定制", link: "/zh/frontend/style.html" }, { text: "📄 9.16 布局系统", link: "/zh/frontend/layout.html" }, { text: "📄 9.17 工具函数", link: "/zh/frontend/utils.html" }, { text: "📄 9.18 Hooks 与枚举", link: "/zh/frontend/hooks-enums.html" }, ], }, ], }, // ================================================================ // 第 10 章:代码生成器 // ================================================================ { text: "🔧 10. 代码生成器", collapsed: false, items: [ { text: "📄 10.1 概述与架构", link: "/zh/generator/overview.html" }, { text: "📄 10.2 CLI 命令行使用", link: "/zh/generator/cli.html" }, { text: "📄 10.3 Web 管理界面", link: "/zh/generator/web-ui.html" }, { text: "📄 10.4 表结构解析与渲染引擎", link: "/zh/generator/code-engine.html" }, { text: "📄 10.5 模板体系", link: "/zh/generator/templates.html" }, { text: "📄 10.6 配置与覆盖策略", link: "/zh/generator/config.html" }, { text: "📄 10.7 实战案例", link: "/zh/generator/demo.html" }, { text: "📄 10.8 常见问题", link: "/zh/generator/faq.html" }, ], }, // ================================================================ // 第 11 章:运维部署 // ================================================================ { text: "⚙️ 11. 运维部署", collapsed: false, items: [ { text: "📄 11.1 部署 Checklist", link: "/zh/deploy/checklist.html" }, { text: "📄 11.2 环境规划", link: "/zh/deploy/env-plan.html" }, { text: "📄 11.3 数据库初始化与迁移", link: "/zh/deploy/db-migrate.html" }, { text: "📄 11.4 后端部署", link: "/zh/deploy/backend.html" }, { text: "📄 11.5 前端部署", link: "/zh/deploy/frontend.html" }, { text: "📄 11.6 Docker 生产部署", link: "/zh/deploy/docker.html" }, { text: "📄 11.7 性能调优", link: "/zh/deploy/performance.html" }, { text: "📄 11.8 安全加固清单", link: "/zh/deploy/security.html" }, { text: "📄 11.9 备份与恢复", link: "/zh/deploy/backup.html" }, { text: "📄 11.10 故障排查手册", link: "/zh/deploy/troubleshooting.html" }, { text: "📄 11.11 CI/CD 与质量门禁", link: "/zh/deploy/ci-cd.html" }, ], }, // ================================================================ // 第 12 章:规范标准 // ================================================================ { text: "📋 12. 规范标准", collapsed: false, items: [ { text: "⭐ 必须遵守", collapsed: false, items: [ { text: "📄 12.1 API 响应规范", link: "/zh/standards/api-response.html" }, { text: "📄 12.2 分页查询规范", link: "/zh/standards/pagination.html" }, { text: "📄 12.3 数据访问铁律", link: "/zh/standards/data-access.html" }, { text: "📄 12.4 模块开发规约", link: "/zh/standards/module-code.html" }, { text: "📄 12.5 Git 提交规范", link: "/zh/standards/git.html" }, ], }, { text: "📌 建议遵守", collapsed: false, items: [ { text: "📄 12.6 数据删除规范", link: "/zh/standards/deletion.html" }, { text: "📄 12.7 代码审查清单", link: "/zh/standards/code-review.html" }, { text: "📄 12.8 后端编码规范", link: "/zh/standards/backend-code.html" }, { text: "📄 12.9 前端编码规范", link: "/zh/standards/frontend-code.html" }, ], }, ], }, // ================================================================ // 附录 // ================================================================ { text: "📄 附录", collapsed: false, items: [ { text: "A. 常见问题汇总", link: "/zh/appendix/faq.html" }, { text: "B. 数据库表结构速查", link: "/zh/appendix/database-tables.html" }, { text: "C. 配置项速查", link: "/zh/appendix/config-reference.html" }, { text: "D. Utility 函数速查", link: "/zh/appendix/functions.html" }, { text: "E. API 接口速查表", link: "/zh/appendix/api-cheatsheet.html" }, { text: "F. 中间件执行顺序", link: "/zh/appendix/middleware.html" }, { text: "G. ModuleSpec 声明速查", link: "/zh/appendix/module-spec.html" }, { text: "H. 前端组件速查", link: "/zh/appendix/components.html" }, { text: "I. 前端 Store 速查", link: "/zh/appendix/stores.html" }, { text: "J. 前端枚举速查", link: "/zh/appendix/enums.html" }, { text: "K. 术语表", link: "/zh/appendix/glossary.html" }, { text: "L. 贡献指南", link: "/zh/other/contributing.html" }, { text: "M. 免责声明", link: "/zh/other/declare.html" }, ], }, ], }, }, }; export const zhSearch: DefaultTheme.AlgoliaSearchOptions["locales"] = { zh: { placeholder: "搜索文档", translations: { button: { buttonText: "搜索文档", buttonAriaLabel: "搜索文档", }, modal: { searchBox: { resetButtonTitle: "清除查询条件", resetButtonAriaLabel: "清除查询条件", cancelButtonText: "取消", cancelButtonAriaLabel: "取消", }, startScreen: { recentSearchesTitle: "搜索历史", noRecentSearchesText: "没有搜索历史", saveRecentSearchButtonTitle: "保存至搜索历史", removeRecentSearchButtonTitle: "从搜索历史中移除", favoriteSearchesTitle: "收藏", removeFavoriteSearchButtonTitle: "从收藏中移除", }, errorScreen: { titleText: "无法获取结果", helpText: "你可能需要检查你的网络连接", }, footer: { selectText: "选择", navigateText: "切换", closeText: "关闭", searchByText: "搜索供应商", }, noResultsScreen: { noResultsText: "无法找到相关结果", suggestedQueryText: "你可以尝试查询", reportMissingResultsText: "你认为该查询应该有结果?", reportMissingResultsLinkText: "点击反馈", }, }, }, }, };