# react-admin-template **Repository Path**: we_coder/react-admin-template ## Basic Information - **Project Name**: react-admin-template - **Description**: Vite + React-TS + Antd的一套后台管理系统模板 - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2022-07-22 - **Last Updated**: 2024-03-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Vite + React + TS + antd 后台管理系统模板 ## 使用流程 1.安装脚手架 `npm install -g wecoder-cli` 2.初始化项目 ``` # 1.初始化命令 wecoder init # 2.项目基本信息配置 version author .... # 3.选择模板 [·] Vite + react + TS + antd 后台管理系统模板 # 4.选择安装依赖 [·] yarn [·] npm [·] cnpm [·] 手动安装 # 5.等待安装完成 .... ``` 3.本地开发 ``` yarn dev #or npm run dev ``` 4.生产打包 ``` # 默认打包 yarn build #or npm run build # 分环境打包 yarn build: #例如,yarn build:test #or npm run build: ``` ## 目录结构 ``` - public ------------------------ 无需打包的静态资源 - src --------------------------- 源代码目录 -- api -------------------------- api统一管理 --- modules --------------------- 各业务模块api请求管理 --- api.ts ---------------------- axios请求和响应的统一处理 --- baseUrl.ts ------------------ 各个服务请求的域名管理 --- index.ts -------------------- api请求入口文件 -- assets ------------------------ 静态资源目录 -- components -------------------- 公共组件 -- mock -------------------------- mock数据存放点 -- pages ------------------------- 页面组件 -- store ------------------------- mobx状态管理 --- index.ts --------------------- 根store --- modules ---------------------- 各个业务模块store -- utils ------------------------- 工具库 -- App.tsx ----------------------- 根组件 -- BaseRoutes.tsx ---------------- 路由处理组件 -- main.tsx ---------------------- 主入口组件 - .env.[mode] -------------------- 环境变量 - index.html --------------------- 模板文件 - package.json ------------------- npm配置 - tsconfig.json ------------------- ts配置文件 - vite.config.ts ------------------ vite配置入口文件 ```