2022-03-14 23:44:51 +08:00
|
|
|
|
<p align="center">
|
2023-05-12 13:25:33 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Vue-3.3.1-brightgreen.svg"/>
|
|
|
|
|
|
<img src="https://img.shields.io/badge/Vite-4.3.5-green.svg"/>
|
2023-05-17 04:36:21 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Element Plus-2.3.4-blue.svg"/>
|
2022-05-15 00:13:51 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/license-MIT-green.svg"/>
|
2022-03-14 23:44:51 +08:00
|
|
|
|
<a href="https://gitee.com/youlaiorg" target="_blank">
|
|
|
|
|
|
<img src="https://img.shields.io/badge/Author-有来开源组织-orange.svg"/>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p align="center">
|
2023-05-21 22:28:58 +08:00
|
|
|
|
<a target="_blank" href="https://juejin.cn/post/7228990409909108793">vue3-element-admin官方文档</a> | <a target="_blank" href="http://vue3.youlai.tech">在线预览</a>
|
2022-03-14 23:44:51 +08:00
|
|
|
|
</p>
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-03-14 23:44:51 +08:00
|
|
|
|
## 项目介绍
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
[vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) 是基于 Vue3 + Vite4+ TypeScript5 + Element-Plus + Pinia 等技术栈构建的后台管理前端模板(配套后端源码)。
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2023-03-12 11:34:59 +08:00
|
|
|
|
## 项目特色
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2023-03-12 22:23:34 +08:00
|
|
|
|
- 基于 `vue-element-admin` 升级的 `Vue3` 版本,主流技术栈,无过度自定义封装,极易上手,减少学习成本;
|
2023-03-12 11:34:59 +08:00
|
|
|
|
- 配套 `Java` 后台接口,非 `Mock` 数据,[在线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5/api-65851240);
|
|
|
|
|
|
- 系统功能:用户、角色、菜单、字典管和部门管理等;
|
|
|
|
|
|
- 基础设施:动态路由,按钮权限,常用组件封装。
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 项目预览
|
|
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- **在线预览地址**: [https://vue3.youlai.tech/](https://vue3.youlai.tech/)
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- **控制台**
|
|
|
|
|
|

|
2023-03-13 00:48:44 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- **接口文档**
|
|
|
|
|
|

|
2023-03-13 00:37:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- **权限管理系统**
|
2023-03-13 00:37:37 +08:00
|
|
|
|
|  |  |
|
2022-05-15 19:33:45 +08:00
|
|
|
|
| --- | --- |
|
2023-03-13 00:37:37 +08:00
|
|
|
|
|  |  |
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-03-14 23:44:51 +08:00
|
|
|
|
## 项目地址
|
|
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
| 项目 | Gitee | Github |GitCode |
|
|
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
|
|
| 前端 | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) |[vue3-element-admin](https://gitcode.net/youlai/vue3-element-admin)|
|
|
|
|
|
|
| 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/hxrui/youlai-boot.git) |[youlai-boot](https://gitcode.net/youlai/youlai-boot)|
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
## 环境准备
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
| 环境 | 名称版本 | 备注 |
|
|
|
|
|
|
| ----------- | :-------- | --------------|
|
|
|
|
|
|
| **开发工具** | VSCode | [下载地址](https://code.visualstudio.com/Download) |
|
|
|
|
|
|
| **运行环境** | Node 16+ | [下载地址](http://nodejs.cn/download) |
|
|
|
|
|
|
| **VSCode插件(必装)** | 1. `Vue Language Features (Volar) ` <br/> 2. `TypeScript Vue Plugin (Volar) ` <br/>3. 禁用 Vetur |  |
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
2022-12-09 01:42:59 +08:00
|
|
|
|
## 项目启动
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2023-03-12 01:37:01 +08:00
|
|
|
|
```bash
|
2023-05-21 22:28:58 +08:00
|
|
|
|
# 克隆代码
|
|
|
|
|
|
git clone https://gitee.com/youlaiorg/vue3-element-admin.git
|
|
|
|
|
|
|
2023-03-12 01:37:01 +08:00
|
|
|
|
# 安装 pnpm
|
|
|
|
|
|
npm install pnpm -g
|
2022-12-18 15:44:45 +08:00
|
|
|
|
|
2023-03-12 01:37:01 +08:00
|
|
|
|
# 安装依赖
|
|
|
|
|
|
pnpm install
|
2023-03-11 21:28:19 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
# 启动运行
|
2023-03-12 01:37:01 +08:00
|
|
|
|
pnpm run dev
|
2023-05-21 22:28:58 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## 项目部署
|
2021-11-23 09:10:04 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
```bash
|
2023-03-14 18:41:05 +08:00
|
|
|
|
# 项目打包
|
|
|
|
|
|
pnpm run build:prod
|
2022-05-04 14:58:23 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
# 上传文件至远程服务器
|
|
|
|
|
|
将打包生成在 `dist` 目录下的文件拷贝至 `/usr/share/nginx/html` 目录
|
2022-05-04 14:58:23 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
# nginx.cofig 配置
|
|
|
|
|
|
server {
|
|
|
|
|
|
listen 80;
|
|
|
|
|
|
server_name localhost;
|
|
|
|
|
|
location / {
|
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
|
index index.html index.htm;
|
|
|
|
|
|
}
|
|
|
|
|
|
# 反向代理配置
|
|
|
|
|
|
location /prod-api/ {
|
|
|
|
|
|
proxy_pass http://vapi.youlai.tech/; # vapi.youlai.tech替换成你的后端API地址
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
```
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
## 接口支持
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- **接口调用地址**:[https://vapi.youlai.tech](https://vapi.youlai.tech)
|
|
|
|
|
|
- **接口文档地址**:[在线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5)
|
|
|
|
|
|
- **OpenAPI文档地址**:[http://vapi.youlai.tech/v3/api-docs](http://vapi.youlai.tech/v3/api-docs)
|
|
|
|
|
|
- **本地接口**:默认使用线上接口,你可以通过以下步骤完成本地接口环境搭建:
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
> 1. 获取基于 `Java 、SpringBoot` 开发的后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git) 源码 ;
|
|
|
|
|
|
> 2. 根据后端工程说明文档 [README.md](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C) 完成本地启动;
|
|
|
|
|
|
> 3. 替换 [vite.config.ts](vite.config.ts) 的代理目标地址 [vapi.youlai.tech](vapi.youlai.tech) 为本地的 [localhost:8989](localhost:8989).
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
## 项目文档
|
2023-03-11 21:28:19 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- [基于 Vue3 + Vite4 + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394)
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
- [ESLint+Prettier+Stylelint+EditorConfig 约束和统一前端代码规范](https://blog.csdn.net/u013737132/article/details/130190788)
|
|
|
|
|
|
- [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://blog.csdn.net/u013737132/article/details/130191363)
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
## Git 提交规范
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
执行唤起 git commit 交互,根据提示完成信息的输入和选择。
|
2023-03-12 01:38:36 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|

|
2023-03-12 01:38:36 +08:00
|
|
|
|
|
2023-03-12 11:34:59 +08:00
|
|
|
|
|
2023-05-21 22:28:58 +08:00
|
|
|
|
## 联系我们
|
|
|
|
|
|
|
|
|
|
|
|
> 如果交流群的二维码已过期,请加我微信,备注「前端」或「全栈」,我将邀请您加入相应的群组。
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
2023-04-18 07:40:52 +08:00
|
|
|
|
|