2022-03-14 23:44:51 +08:00
|
|
|
|
<p align="center">
|
2023-03-14 18:41:05 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Vue-3.2.45-brightgreen.svg"/>
|
2023-04-25 06:49:06 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Vite-4.3.1-green.svg"/>
|
2023-03-28 23:59:05 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Element Plus-2.3.1-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-04-21 15:55:57 +08:00
|
|
|
|
<a target="_blank" href="https://www.cnblogs.com/haoxianrui/p/17331952.html">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-03-12 11:34:59 +08:00
|
|
|
|
[vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) 是基于 [vue-element-admin](https://gitee.com/panjiachen/vue-element-admin) 升级的 `Vue3` 版本后台管理框架,使用 Vue3、Vite4、TypeScript、Pinia、Element Plus 当前主流技术栈开发。
|
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);
|
|
|
|
|
|
- 从 `0` 到 `1` 的项目文档支持,[官方文档](https://www.cnblogs.com/haoxianrui/p/16090029.html)。
|
|
|
|
|
|
- 系统功能:用户、角色、菜单、字典管和部门管理等;
|
|
|
|
|
|
- 基础设施:动态路由,按钮权限,常用组件封装。
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
|
|
|
|
|
## 技术栈
|
|
|
|
|
|
|
2022-05-15 19:33:45 +08:00
|
|
|
|
| 技术栈 | 描述 | 官网 |
|
|
|
|
|
|
| --- | --- | --- |
|
|
|
|
|
|
| Vue3 | 渐进式 JavaScript 框架 | https://v3.cn.vuejs.org/ |
|
|
|
|
|
|
| TypeScript | JavaScript 的一个超集 | https://www.tslang.cn/ |
|
2022-10-28 01:50:35 +08:00
|
|
|
|
| Vite | 前端开发与构建工具 | https://cn.vitejs.dev/ |
|
2022-05-04 14:58:23 +08:00
|
|
|
|
| Element Plus | 基于 Vue 3,面向设计师和开发者的组件库 | https://element-plus.gitee.io/zh-CN/ |
|
2022-05-15 19:33:45 +08:00
|
|
|
|
| Pinia | 新一代状态管理工具 | https://pinia.vuejs.org/ |
|
|
|
|
|
|
| Vue Router | Vue.js 的官方路由 | https://router.vuejs.org/zh/ |
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
|
|
|
|
|
## 项目预览
|
|
|
|
|
|
|
2023-03-13 00:37:37 +08:00
|
|
|
|
**在线预览地址**: [http://vue3.youlai.tech/](http://vue3.youlai.tech/)
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2023-03-13 00:48:44 +08:00
|
|
|
|
**控制台 & 接口文档**
|
|
|
|
|
|
|
2023-03-14 22:00:31 +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
|
|
|
|
## 项目地址
|
|
|
|
|
|
|
2022-05-15 19:33:45 +08:00
|
|
|
|
| | Gitee | Github |
|
|
|
|
|
|
| --- | --- | --- |
|
2022-05-15 00:11:55 +08:00
|
|
|
|
| vue3-element-admin | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) |
|
2023-03-13 00:51:47 +08:00
|
|
|
|
| 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/hxrui/youlai-boot.git) |
|
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-11 21:28:19 +08:00
|
|
|
|
- Node 环境
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
2022-11-23 01:18:16 +08:00
|
|
|
|
版本:16+
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
|
|
|
|
|
- 开发工具
|
|
|
|
|
|
|
2022-11-08 23:44:34 +08:00
|
|
|
|
VSCode
|
2022-03-14 23:44:51 +08:00
|
|
|
|
|
|
|
|
|
|
- 必装插件
|
|
|
|
|
|
|
2023-03-11 21:28:19 +08:00
|
|
|
|
- Vue Language Features (Volar)
|
2022-11-08 23:40:08 +08:00
|
|
|
|
- TypeScript Vue Plugin (Volar)
|
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
|
|
|
|
|
|
# 安装 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-03-12 01:37:01 +08:00
|
|
|
|
# 项目运行
|
|
|
|
|
|
pnpm run dev
|
2021-11-23 09:10:04 +08:00
|
|
|
|
|
2023-03-14 18:41:05 +08:00
|
|
|
|
# 项目打包
|
|
|
|
|
|
pnpm run build:prod
|
2022-05-04 14:58:23 +08:00
|
|
|
|
|
2023-03-14 18:41:05 +08:00
|
|
|
|
```
|
2022-05-04 14:58:23 +08:00
|
|
|
|
|
2023-03-14 18:41:05 +08:00
|
|
|
|
## 项目部署
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-10-25 00:29:27 +08:00
|
|
|
|
- 上传文件
|
|
|
|
|
|
|
2023-03-14 18:41:05 +08:00
|
|
|
|
将打包生成在 `dist` 目录下的文件拷贝至 `/usr/share/nginx/html` 目录
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2022-03-14 23:44:51 +08:00
|
|
|
|
- nginx.cofig 配置
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-05-04 14:58:23 +08:00
|
|
|
|
```
|
|
|
|
|
|
server {
|
|
|
|
|
|
listen 80;
|
|
|
|
|
|
server_name localhost;
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-05-04 14:58:23 +08:00
|
|
|
|
location / {
|
2023-03-14 18:41:05 +08:00
|
|
|
|
root /usr/share/nginx/html;
|
2022-05-04 14:58:23 +08:00
|
|
|
|
index index.html index.htm;
|
|
|
|
|
|
}
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2023-03-14 18:41:05 +08:00
|
|
|
|
# 代理转发 prod-api 标识至 vapi.youlai.tech
|
2022-05-04 14:58:23 +08:00
|
|
|
|
location /prod-api/ {
|
2022-10-28 01:50:35 +08:00
|
|
|
|
proxy_pass http://vapi.youlai.tech/;
|
2022-05-04 14:58:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2022-05-04 14:58:23 +08:00
|
|
|
|
```
|
2023-03-11 21:28:19 +08:00
|
|
|
|
|
2023-03-12 01:37:01 +08:00
|
|
|
|
## 接口文档
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2023-03-12 11:34:59 +08:00
|
|
|
|
- 接口调用地址:[vapi.youlai.tech](http://vapi.youlai.tech)
|
|
|
|
|
|
- 接口文档地址:[vue3-element-admin 在线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5/api-65851240)
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2023-03-14 18:41:05 +08:00
|
|
|
|
## 本地接口
|
2022-10-25 00:29:27 +08:00
|
|
|
|
|
2023-03-12 01:38:36 +08:00
|
|
|
|
> 默认使用线上接口,你可以通过以下步骤完成本地接口环境搭建:
|
2021-11-14 23:16:16 +08:00
|
|
|
|
|
2023-03-12 01:38:36 +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) 完成本地启动;
|
2023-03-13 00:37:37 +08:00
|
|
|
|
3. 替换 [vite.config.ts](vite.config.ts) 的代理目标地址 [vapi.youlai.tech](vapi.youlai.tech) 为本地的 [localhost:8989](localhost:8989) 。
|
2023-03-12 01:38:36 +08:00
|
|
|
|
|
2023-03-29 23:51:40 +08:00
|
|
|
|
## 关于我们
|
2023-03-12 01:38:36 +08:00
|
|
|
|
|
2023-04-10 07:33:44 +08:00
|
|
|
|
> 欢迎加我的微信,备注 `前端`、`后端`、`全栈` 进对应技术交流群
|
2023-03-12 11:34:59 +08:00
|
|
|
|
|
2023-04-18 07:40:52 +08:00
|
|
|
|
| 微信交流群 | 我的微信 |
|
|
|
|
|
|
| --- | --- |
|
2023-04-23 07:54:01 +08:00
|
|
|
|
|  |  |
|
2023-04-18 07:40:52 +08:00
|
|
|
|
|
|
|
|
|
|

|