README.md 5.1 KB
Newer Older
1
<p align="center">
H
haoxr 已提交
2
    <img src="https://img.shields.io/badge/Vue-3.2.40-brightgreen.svg"/>
H
haoxr 已提交
3
    <img src="https://img.shields.io/badge/Vite-4.0.0-green.svg"/>
H
haoxr 已提交
4
    <img src="https://img.shields.io/badge/Element Plus-2.2.27-blue.svg"/>
5
    <a href="https://gitee.com/youlaitech/youlai-mall" target="_blank">
6
        <img src="https://gitee.com/youlaiorg/vue3-element-admin/badge/star.svg"/>
7
    </a> 
8
    <img src="https://img.shields.io/badge/license-MIT-green.svg"/>
9 10 11 12 13
    <a href="https://gitee.com/youlaiorg" target="_blank">
        <img src="https://img.shields.io/badge/Author-有来开源组织-orange.svg"/>
    </a>
</p>
<p align="center">
14
<a target="_blank" href="http://vue3.youlai.tech">在线预览</a> |  <a target="_blank" href="https://www.youlai.tech/page/5d571c/">官方文档</a> 
15
</p>
16

17
## 项目介绍
18

H
haoxr 已提交
19
[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 当前主流技术栈开发。
20

H
haoxr 已提交
21
## 项目特色
22

H
haoxr 已提交
23
- 基于 `vue-element-admin` 升级的 `Vue3` 版本,主流技术栈,无过度自定义封装,极易上手,减少学习成本;
H
haoxr 已提交
24 25 26 27
- 配套 `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)
- 系统功能:用户、角色、菜单、字典管和部门管理等;
- 基础设施:动态路由,按钮权限,常用组件封装。
28 29 30

## 技术栈

31 32 33 34
| 技术栈 | 描述 | 官网 |
| --- | --- | --- |
| Vue3 | 渐进式 JavaScript 框架 | https://v3.cn.vuejs.org/ |
| TypeScript | JavaScript 的一个超集 | https://www.tslang.cn/ |
H
horizons 已提交
35
| Vite | 前端开发与构建工具 | https://cn.vitejs.dev/ |
36
| Element Plus | 基于 Vue 3,面向设计师和开发者的组件库 | https://element-plus.gitee.io/zh-CN/ |
37 38
| Pinia | 新一代状态管理工具 | https://pinia.vuejs.org/ |
| Vue Router | Vue.js 的官方路由 | https://router.vuejs.org/zh/ |
39 40 41

## 项目预览

H
haoxr 已提交
42
**在线预览地址**[http://vue3.youlai.tech/](http://vue3.youlai.tech/)
43

44 45
**控制台 & 接口文档**

H
haoxr 已提交
46 47 48
| ![暗黑模式](https://s2.loli.net/2023/03/13/QvjY4zf3VCGteNF.png) |
| --------------------------------------------------------------- |
| ![接口文档](https://s2.loli.net/2023/03/13/bH4J3O6WRgCUpwt.png) |
H
haoxr 已提交
49 50 51 52

**权限管理系统**

| ![用户管理](https://s2.loli.net/2023/03/13/L9xgT5sSMVZukQj.png) | ![image-20230313003008012](https://s2.loli.net/2023/03/13/nQg6HmrtFUkPDYv.png) |
53
| --- | --- |
H
haoxr 已提交
54
| ![image-20230313003028425](https://s2.loli.net/2023/03/13/C4fDRJeTuUO7gPI.png) | ![字典管理](https://s2.loli.net/2023/03/13/BzqjHpa64wfeWhE.png) |
55

56 57
## 项目地址

58 59
|  | Gitee | Github |
| --- | --- | --- |
60
| vue3-element-admin | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) |
H
haoxr 已提交
61
| 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/hxrui/youlai-boot.git) |
62

H
haoxr 已提交
63
## 环境要求
64

65
- Node 环境
66

H
haoxr 已提交
67
  版本:16+
68 69 70

- 开发工具

H
haoxr 已提交
71
  VSCode
72 73 74

- 必装插件

75
  - Vue Language Features (Volar)
H
haoxr 已提交
76
  - TypeScript Vue Plugin (Volar)
77

H
haoxr 已提交
78
## 项目启动
79

H
haoxr 已提交
80 81 82
```bash
# 安装 pnpm
npm install pnpm -g
H
haoxr 已提交
83

H
haoxr 已提交
84 85
# 安装依赖
pnpm install
86

H
haoxr 已提交
87 88 89
# 项目运行
pnpm run dev
```
90

H
haoxr 已提交
91
## 项目部署
92

93
- 打包项目
94 95

  ```
96
  pnpm run build:prod
97 98
  ```

H
haoxr 已提交
99
  生成的静态文件位于项目根目录 `dist` 文件夹下
100

101 102
- 上传文件

H
haoxr 已提交
103
  创建 `/mnt/nginx/html` 目录,将打包生成 `dist` 下的所有文件拷贝至此工作目录下
104

105
- nginx.cofig 配置
106

107 108 109 110
  ```
  server {
      listen     80;
      server_name  localhost;
111

112
      location / {
H
haoxr 已提交
113
          root /mnt/nginx/html;
114 115
          index index.html index.htm;
      }
116

H
haoxr 已提交
117
      # 代理转发 prod-api 请求至 vapi.youlai.tech
118
      location /prod-api/ {
H
horizons 已提交
119
          proxy_pass http://vapi.youlai.tech/;
120 121
      }
  }
122

123
  ```
124

H
haoxr 已提交
125
## 接口文档
126

H
haoxr 已提交
127
**线上接口**
128

H
haoxr 已提交
129 130
- 接口调用地址:[vapi.youlai.tech](http://vapi.youlai.tech)
- 接口文档地址:[vue3-element-admin 在线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5/api-65851240)
131

H
haoxr 已提交
132
**本地接口**
133

H
haoxr 已提交
134
> 默认使用线上接口,你可以通过以下步骤完成本地接口环境搭建:
135

H
haoxr 已提交
136 137 138
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) 完成本地启动;

H
haoxr 已提交
139
3.  替换 [vite.config.ts](vite.config.ts) 的代理目标地址 [vapi.youlai.tech](vapi.youlai.tech) 为本地的 [localhost:8989](localhost:8989)
H
haoxr 已提交
140

H
haoxr 已提交
141
## 关于我
H
haoxr 已提交
142

H
haoxr 已提交
143 144 145
> 欢迎加我的微信,备注 `前端`、`后端`、`运维`、`全栈` 进对应技术交流群

| 开发者 | 微信公众号 |
146
| --- | --- |
H
haoxr 已提交
147
| <img  src="https://s2.loli.net/2022/04/06/yRx8uzj4emA5QVr.jpg"   width="120px" height="120" /> | <img src="https://www.youlai.tech/files/blog/gongzhonghao.jpg"  width="120px" height="120" > |