# ace-platform-ui-antd **Repository Path**: ace_team/ace-platform-ui-antd ## Basic Information - **Project Name**: ace-platform-ui-antd - **Description**: antd与amis应用例子 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-29 - **Last Updated**: 2025-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ace-platform-ui-antd ### 介绍 开源的一套后台管理框架。 ### 三、项目介绍 - 🚀 技术栈:React18、React-Router v6、React-Hooks、Zustand、TypeScript、Vite5、Ant-Design、Amis - 🚀 采用 Vite5 作为项目开发、打包工具(配置了 Gzip 打包、跨域代理、打包预览工具…) - 🚀 整个项目集成了 TypeScript - 🚀 使用 TypeScript 对 Axios 二次封装 (错误拦截、常用请求封装、全局请求 Loading、取消重复请求…) - 🚀 支持 Antd 组件大小切换、暗黑 && 灰色 && 色弱模式、i18n 国际化(i18n 暂时没配置所有文件) - 🚀 使用 自定义高阶组件 进行路由权限拦截(403 页面)、页面按钮权限配置 - 🚀 支持 React-Router v6 路由懒加载配置、菜单手风琴模式、无限级菜单、多标签页、面包屑导航 - 🚀 使用 Prettier 统一格式化代码,集成 Eslint、Stylelint 代码校验规范(项目规范配置) - 🚀 使用 husky、lint-staged、commitlint、commitizen、cz-git 规范提交信息(项目规范配置) ### 四、安装使用步骤 📑 - **Install:** ```text npm install # npm install 安装失败,请升级 nodejs 到 18.19.1 以上,或尝试使用以下命令: npm install --registry=https://registry.npm.taobao.org ``` - **Run:** ```text npm run dev npm run serve ``` - **Build:** ```text # 开发环境 npm run build:dev # 测试环境 npm run build:test # 生产环境 npm run build:pro ``` - **Lint:** ```text # eslint 检测代码 npm run lint:eslint # prettier 格式化代码 npm run lint:prettier # stylelint 格式化样式 lint:stylelint ``` - **commit:** ```text # 提交代码(会自动执行 lint:lint-staged 命令) npm run commit ``` ### 文件资源目录 📚 ```text ac-admin ├─ mock # api模拟数据(忽略打包) ├─ public # 静态资源文件(忽略打包) ├─ src │ ├─ assets # 静态资源文件 │ ├─ components # 全局组件 │ ├─ core # 核心业务逻辑 │ ├─ routers # 路由管理 │ ├─ typings # 全局 ts 声明 │ ├─ ui # ui │ │ ├─ antd # antd 界面 │ │ │ ├─ pages # 所有页面 │ │ │ │ ├─ main # 主页面 │ │ │ │ │ ├─ layout # 主页面主架构 │ │ │ │ │ ├─ view # 主页面的子页视图 │ │ │ │ ├─ login # 登录页 │ │ │ ├─ service # ui 逻辑 │ │ │ │ ├─ router # 主页面的子页视图路由 │ ├─ App.tsx # 入口页面 │ ├─ main.tsx # 入口文件 ├─ .editorconfig # 编辑器配置(格式化) ├─ .env # vite 常用配置 ├─ .env.development # 开发环境配置 ├─ .env.production # 生产环境配置 ├─ .env.test # 测试环境配置 ├─ .eslintignore # 忽略 Eslint 校验 ├─ .eslintrc.js # Eslint 校验配置 ├─ .gitignore # git 提交忽略 ├─ .prettierignore # 忽略 prettier 格式化 ├─ .prettierrc.js # prettier 配置 ├─ .stylelintignore # 忽略 stylelint 格式化 ├─ .stylelintrc.js # stylelint 样式格式化配置 ├─ CHANGELOG.md # 项目更新日志 ├─ commitlint.config.js # git 提交规范配置 ├─ index.html # 入口 html ├─ LICENSE # 开源协议文件 ├─ lint-staged.config # lint-staged 配置文件 ├─ package-lock.json # 依赖包包版本锁 ├─ package.json # 依赖包管理 ├─ postcss.config.js # postcss 配置 ├─ README.md # README 介绍 ├─ tsconfig.json # typescript 全局配置 └─ vite.config.ts # vite 配置 ``` ### 七、浏览器支持 - 本地开发推荐使用 Chrome 最新版浏览器 [Download](https://www.google.com/intl/zh-CN/chrome/)。 - 生产环境支持现代浏览器,不在支持 IE 浏览器,更多浏览器可以查看 [Can I Use Es Module](https://caniuse.com/?search=ESModule)。 | ![IE](https://i.imgtg.com/2023/04/11/8z7ot.png) | ![Edge](https://i.imgtg.com/2023/04/11/8zr3p.png) | ![Firefox](https://i.imgtg.com/2023/04/11/8zKiU.png) | ![Chrome](https://i.imgtg.com/2023/04/11/8zNrx.png) | ![Safari](https://i.imgtg.com/2023/04/11/8zeGj.png) | | :---------------------------------------------: | :-----------------------------------------------: | :--------------------------------------------------: | :-------------------------------------------------: | :-------------------------------------------------: | | not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | ### 八、项目后台接口 项目后台接口完全采用 Mock 数据 ##### 新增 mock 数据方式 1. 原生vite-plugin-mock方式:在mock目录下添加导出MockMethod数组的文件 2. 优先级排序方式: 2.1 在mock目录添加文件,调用mockUtils.addPriorityMockMethod方法添加到优先级数据中,高优先级MockMethod会覆盖低优先级的MockMethod 2.2 在mock/mainImports.ts文件中导入上一步新增的文件 /mock/mainImports.ts,优先级排序的MockMethod导入文件 /mock/mainMock.ts,优先级排序的主逻辑文件,负责生成惟一 url的MockMethod数组