fmt code
This commit is contained in:
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
dist
|
||||||
|
node_modules
|
||||||
|
yarn.lock
|
0
.prettierrc.yaml
Normal file
0
.prettierrc.yaml
Normal file
217
README.md
217
README.md
@ -1,109 +1,108 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
||||||
</p>
|
</p>
|
||||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.5</h1>
|
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.5</h1>
|
||||||
<h4 align="center">基于SpringBoot+Vue3前后端分离的Java快速开发框架</h4>
|
<h4 align="center">基于SpringBoot+Vue3前后端分离的Java快速开发框架</h4>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.5-brightgreen.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.5-brightgreen.svg"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## 平台简介
|
## 平台简介
|
||||||
|
|
||||||
* 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。
|
- 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。
|
||||||
* 配套后端代码仓库地址[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) 或 [RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast) 版本。
|
- 配套后端代码仓库地址[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) 或 [RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast) 版本。
|
||||||
* 前端技术栈([Vue2](https://cn.vuejs.org) + [Element](https://github.com/ElemeFE/element) + [Vue CLI](https://cli.vuejs.org/zh)),请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue/tree/master/ruoyi-ui)。
|
- 前端技术栈([Vue2](https://cn.vuejs.org) + [Element](https://github.com/ElemeFE/element) + [Vue CLI](https://cli.vuejs.org/zh)),请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue/tree/master/ruoyi-ui)。
|
||||||
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
- 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
||||||
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
- 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||||
|
|
||||||
## 前端运行
|
## 前端运行
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 克隆项目
|
# 克隆项目
|
||||||
git clone https://github.com/yangzongzhuan/RuoYi-Vue3.git
|
git clone https://github.com/yangzongzhuan/RuoYi-Vue3.git
|
||||||
|
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
cd RuoYi-Vue3
|
cd RuoYi-Vue3
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
yarn --registry=https://registry.npmmirror.com
|
yarn --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
# 启动服务
|
# 启动服务
|
||||||
yarn dev
|
yarn dev
|
||||||
|
|
||||||
# 构建测试环境 yarn build:stage
|
# 构建测试环境 yarn build:stage
|
||||||
# 构建生产环境 yarn build:prod
|
# 构建生产环境 yarn build:prod
|
||||||
# 前端访问地址 http://localhost:80
|
# 前端访问地址 http://localhost:80
|
||||||
```
|
```
|
||||||
|
|
||||||
## 内置功能
|
## 内置功能
|
||||||
|
|
||||||
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
|
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
|
||||||
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
|
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
|
||||||
3. 岗位管理:配置系统用户所属担任职务。
|
3. 岗位管理:配置系统用户所属担任职务。
|
||||||
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
|
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
|
||||||
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
|
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
|
||||||
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
|
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
|
||||||
7. 参数管理:对系统动态配置常用参数。
|
7. 参数管理:对系统动态配置常用参数。
|
||||||
8. 通知公告:系统通知公告信息发布维护。
|
8. 通知公告:系统通知公告信息发布维护。
|
||||||
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
|
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
|
||||||
10. 登录日志:系统登录日志记录查询包含登录异常。
|
10. 登录日志:系统登录日志记录查询包含登录异常。
|
||||||
11. 在线用户:当前系统中活跃用户状态监控。
|
11. 在线用户:当前系统中活跃用户状态监控。
|
||||||
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
||||||
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持 CRUD 下载 。
|
||||||
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
14. 系统接口:根据业务代码自动生成相关的 api 接口文档。
|
||||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
15. 服务监控:监视当前系统 CPU、内存、磁盘、堆栈等相关信息。
|
||||||
16. 缓存监控:对系统的缓存信息查询,命令统计等。
|
16. 缓存监控:对系统的缓存信息查询,命令统计等。
|
||||||
17. 在线构建器:拖动表单元素生成相应的HTML代码。
|
17. 在线构建器:拖动表单元素生成相应的 HTML 代码。
|
||||||
18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
18. 连接池监视:监视当前系统数据库连接池状态,可进行分析 SQL 找出系统性能瓶颈。
|
||||||
|
|
||||||
## 在线体验
|
## 在线体验
|
||||||
|
|
||||||
- admin/admin123
|
- admin/admin123
|
||||||
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
||||||
|
|
||||||
演示地址:http://vue.ruoyi.vip
|
演示地址:http://vue.ruoyi.vip
|
||||||
文档地址:http://doc.ruoyi.vip
|
文档地址:http://doc.ruoyi.vip
|
||||||
|
|
||||||
## 演示图
|
## 演示图
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
## 若依前后端分离交流群
|
||||||
## 若依前后端分离交流群
|
|
||||||
|
QQ 群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) 点击按钮入群。
|
||||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) 点击按钮入群。
|
|
||||||
|
308
html/ie.html
308
html/ie.html
File diff suppressed because one or more lines are too long
432
index.html
432
index.html
@ -1,215 +1,217 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="utf-8" />
|
||||||
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="renderer" content="webkit" />
|
||||||
<meta name="renderer" content="webkit">
|
<meta
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
name="viewport"
|
||||||
<link rel="icon" href="/favicon.ico">
|
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
||||||
<title>若依管理系统</title>
|
/>
|
||||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<style>
|
<title>若依管理系统</title>
|
||||||
html,
|
<!--[if lt IE 11
|
||||||
body,
|
]><script>
|
||||||
#app {
|
window.location.href = "/html/ie.html";
|
||||||
height: 100%;
|
</script><!
|
||||||
margin: 0px;
|
[endif]-->
|
||||||
padding: 0px;
|
<style>
|
||||||
}
|
html,
|
||||||
|
body,
|
||||||
.chromeframe {
|
#app {
|
||||||
margin: 0.2em 0;
|
height: 100%;
|
||||||
background: #ccc;
|
margin: 0px;
|
||||||
color: #000;
|
padding: 0px;
|
||||||
padding: 0.2em 0;
|
}
|
||||||
}
|
|
||||||
|
.chromeframe {
|
||||||
#loader-wrapper {
|
margin: 0.2em 0;
|
||||||
position: fixed;
|
background: #ccc;
|
||||||
top: 0;
|
color: #000;
|
||||||
left: 0;
|
padding: 0.2em 0;
|
||||||
width: 100%;
|
}
|
||||||
height: 100%;
|
|
||||||
z-index: 999999;
|
#loader-wrapper {
|
||||||
}
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
#loader {
|
left: 0;
|
||||||
display: block;
|
width: 100%;
|
||||||
position: relative;
|
height: 100%;
|
||||||
left: 50%;
|
z-index: 999999;
|
||||||
top: 50%;
|
}
|
||||||
width: 150px;
|
|
||||||
height: 150px;
|
#loader {
|
||||||
margin: -75px 0 0 -75px;
|
display: block;
|
||||||
border-radius: 50%;
|
position: relative;
|
||||||
border: 3px solid transparent;
|
left: 50%;
|
||||||
border-top-color: #FFF;
|
top: 50%;
|
||||||
-webkit-animation: spin 2s linear infinite;
|
width: 150px;
|
||||||
-ms-animation: spin 2s linear infinite;
|
height: 150px;
|
||||||
-moz-animation: spin 2s linear infinite;
|
margin: -75px 0 0 -75px;
|
||||||
-o-animation: spin 2s linear infinite;
|
border-radius: 50%;
|
||||||
animation: spin 2s linear infinite;
|
border: 3px solid transparent;
|
||||||
z-index: 1001;
|
border-top-color: #fff;
|
||||||
}
|
-webkit-animation: spin 2s linear infinite;
|
||||||
|
-ms-animation: spin 2s linear infinite;
|
||||||
#loader:before {
|
-moz-animation: spin 2s linear infinite;
|
||||||
content: "";
|
-o-animation: spin 2s linear infinite;
|
||||||
position: absolute;
|
animation: spin 2s linear infinite;
|
||||||
top: 5px;
|
z-index: 1001;
|
||||||
left: 5px;
|
}
|
||||||
right: 5px;
|
|
||||||
bottom: 5px;
|
#loader:before {
|
||||||
border-radius: 50%;
|
content: "";
|
||||||
border: 3px solid transparent;
|
position: absolute;
|
||||||
border-top-color: #FFF;
|
top: 5px;
|
||||||
-webkit-animation: spin 3s linear infinite;
|
left: 5px;
|
||||||
-moz-animation: spin 3s linear infinite;
|
right: 5px;
|
||||||
-o-animation: spin 3s linear infinite;
|
bottom: 5px;
|
||||||
-ms-animation: spin 3s linear infinite;
|
border-radius: 50%;
|
||||||
animation: spin 3s linear infinite;
|
border: 3px solid transparent;
|
||||||
}
|
border-top-color: #fff;
|
||||||
|
-webkit-animation: spin 3s linear infinite;
|
||||||
#loader:after {
|
-moz-animation: spin 3s linear infinite;
|
||||||
content: "";
|
-o-animation: spin 3s linear infinite;
|
||||||
position: absolute;
|
-ms-animation: spin 3s linear infinite;
|
||||||
top: 15px;
|
animation: spin 3s linear infinite;
|
||||||
left: 15px;
|
}
|
||||||
right: 15px;
|
|
||||||
bottom: 15px;
|
#loader:after {
|
||||||
border-radius: 50%;
|
content: "";
|
||||||
border: 3px solid transparent;
|
position: absolute;
|
||||||
border-top-color: #FFF;
|
top: 15px;
|
||||||
-moz-animation: spin 1.5s linear infinite;
|
left: 15px;
|
||||||
-o-animation: spin 1.5s linear infinite;
|
right: 15px;
|
||||||
-ms-animation: spin 1.5s linear infinite;
|
bottom: 15px;
|
||||||
-webkit-animation: spin 1.5s linear infinite;
|
border-radius: 50%;
|
||||||
animation: spin 1.5s linear infinite;
|
border: 3px solid transparent;
|
||||||
}
|
border-top-color: #fff;
|
||||||
|
-moz-animation: spin 1.5s linear infinite;
|
||||||
|
-o-animation: spin 1.5s linear infinite;
|
||||||
@-webkit-keyframes spin {
|
-ms-animation: spin 1.5s linear infinite;
|
||||||
0% {
|
-webkit-animation: spin 1.5s linear infinite;
|
||||||
-webkit-transform: rotate(0deg);
|
animation: spin 1.5s linear infinite;
|
||||||
-ms-transform: rotate(0deg);
|
}
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
@-webkit-keyframes spin {
|
||||||
|
0% {
|
||||||
100% {
|
-webkit-transform: rotate(0deg);
|
||||||
-webkit-transform: rotate(360deg);
|
-ms-transform: rotate(0deg);
|
||||||
-ms-transform: rotate(360deg);
|
transform: rotate(0deg);
|
||||||
transform: rotate(360deg);
|
}
|
||||||
}
|
|
||||||
}
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
@keyframes spin {
|
-ms-transform: rotate(360deg);
|
||||||
0% {
|
transform: rotate(360deg);
|
||||||
-webkit-transform: rotate(0deg);
|
}
|
||||||
-ms-transform: rotate(0deg);
|
}
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
100% {
|
-webkit-transform: rotate(0deg);
|
||||||
-webkit-transform: rotate(360deg);
|
-ms-transform: rotate(0deg);
|
||||||
-ms-transform: rotate(360deg);
|
transform: rotate(0deg);
|
||||||
transform: rotate(360deg);
|
}
|
||||||
}
|
|
||||||
}
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
-ms-transform: rotate(360deg);
|
||||||
#loader-wrapper .loader-section {
|
transform: rotate(360deg);
|
||||||
position: fixed;
|
}
|
||||||
top: 0;
|
}
|
||||||
width: 51%;
|
|
||||||
height: 100%;
|
#loader-wrapper .loader-section {
|
||||||
background: #7171C6;
|
position: fixed;
|
||||||
z-index: 1000;
|
top: 0;
|
||||||
-webkit-transform: translateX(0);
|
width: 51%;
|
||||||
-ms-transform: translateX(0);
|
height: 100%;
|
||||||
transform: translateX(0);
|
background: #7171c6;
|
||||||
}
|
z-index: 1000;
|
||||||
|
-webkit-transform: translateX(0);
|
||||||
#loader-wrapper .loader-section.section-left {
|
-ms-transform: translateX(0);
|
||||||
left: 0;
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#loader-wrapper .loader-section.section-right {
|
#loader-wrapper .loader-section.section-left {
|
||||||
right: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#loader-wrapper .loader-section.section-right {
|
||||||
.loaded #loader-wrapper .loader-section.section-left {
|
right: 0;
|
||||||
-webkit-transform: translateX(-100%);
|
}
|
||||||
-ms-transform: translateX(-100%);
|
|
||||||
transform: translateX(-100%);
|
.loaded #loader-wrapper .loader-section.section-left {
|
||||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
-webkit-transform: translateX(-100%);
|
||||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
-ms-transform: translateX(-100%);
|
||||||
}
|
transform: translateX(-100%);
|
||||||
|
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
.loaded #loader-wrapper .loader-section.section-right {
|
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
-webkit-transform: translateX(100%);
|
}
|
||||||
-ms-transform: translateX(100%);
|
|
||||||
transform: translateX(100%);
|
.loaded #loader-wrapper .loader-section.section-right {
|
||||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
-webkit-transform: translateX(100%);
|
||||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
-ms-transform: translateX(100%);
|
||||||
}
|
transform: translateX(100%);
|
||||||
|
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
.loaded #loader {
|
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
opacity: 0;
|
}
|
||||||
-webkit-transition: all 0.3s ease-out;
|
|
||||||
transition: all 0.3s ease-out;
|
.loaded #loader {
|
||||||
}
|
opacity: 0;
|
||||||
|
-webkit-transition: all 0.3s ease-out;
|
||||||
.loaded #loader-wrapper {
|
transition: all 0.3s ease-out;
|
||||||
visibility: hidden;
|
}
|
||||||
-webkit-transform: translateY(-100%);
|
|
||||||
-ms-transform: translateY(-100%);
|
.loaded #loader-wrapper {
|
||||||
transform: translateY(-100%);
|
visibility: hidden;
|
||||||
-webkit-transition: all 0.3s 1s ease-out;
|
-webkit-transform: translateY(-100%);
|
||||||
transition: all 0.3s 1s ease-out;
|
-ms-transform: translateY(-100%);
|
||||||
}
|
transform: translateY(-100%);
|
||||||
|
-webkit-transition: all 0.3s 1s ease-out;
|
||||||
.no-js #loader-wrapper {
|
transition: all 0.3s 1s ease-out;
|
||||||
display: none;
|
}
|
||||||
}
|
|
||||||
|
.no-js #loader-wrapper {
|
||||||
.no-js h1 {
|
display: none;
|
||||||
color: #222222;
|
}
|
||||||
}
|
|
||||||
|
.no-js h1 {
|
||||||
#loader-wrapper .load_title {
|
color: #222222;
|
||||||
font-family: 'Open Sans';
|
}
|
||||||
color: #FFF;
|
|
||||||
font-size: 19px;
|
#loader-wrapper .load_title {
|
||||||
width: 100%;
|
font-family: "Open Sans";
|
||||||
text-align: center;
|
color: #fff;
|
||||||
z-index: 9999999999999;
|
font-size: 19px;
|
||||||
position: absolute;
|
width: 100%;
|
||||||
top: 60%;
|
text-align: center;
|
||||||
opacity: 1;
|
z-index: 9999999999999;
|
||||||
line-height: 30px;
|
position: absolute;
|
||||||
}
|
top: 60%;
|
||||||
|
opacity: 1;
|
||||||
#loader-wrapper .load_title span {
|
line-height: 30px;
|
||||||
font-weight: normal;
|
}
|
||||||
font-style: italic;
|
|
||||||
font-size: 13px;
|
#loader-wrapper .load_title span {
|
||||||
color: #FFF;
|
font-weight: normal;
|
||||||
opacity: 0.5;
|
font-style: italic;
|
||||||
}
|
font-size: 13px;
|
||||||
</style>
|
color: #fff;
|
||||||
</head>
|
opacity: 0.5;
|
||||||
|
}
|
||||||
<body>
|
</style>
|
||||||
<div id="app">
|
</head>
|
||||||
<div id="loader-wrapper">
|
|
||||||
<div id="loader"></div>
|
<body>
|
||||||
<div class="loader-section section-left"></div>
|
<div id="app">
|
||||||
<div class="loader-section section-right"></div>
|
<div id="loader-wrapper">
|
||||||
<div class="load_title">正在加载系统资源,请耐心等待</div>
|
<div id="loader"></div>
|
||||||
</div>
|
<div class="loader-section section-left"></div>
|
||||||
</div>
|
<div class="loader-section section-right"></div>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<div class="load_title">正在加载系统资源,请耐心等待</div>
|
||||||
</body>
|
</div>
|
||||||
|
</div>
|
||||||
</html>
|
<script type="module" src="/src/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
88
package.json
88
package.json
@ -1,43 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.8.5",
|
"version": "3.8.5",
|
||||||
"description": "若依管理系统",
|
"description": "若依管理系统",
|
||||||
"author": "若依",
|
"author": "若依",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build:prod": "vite build",
|
"build:prod": "vite build",
|
||||||
"build:stage": "vite build --mode staging",
|
"build:stage": "vite build --mode staging",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview",
|
||||||
},
|
"fmt": "prettier -w ."
|
||||||
"repository": {
|
},
|
||||||
"type": "git",
|
"repository": {
|
||||||
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
"type": "git",
|
||||||
},
|
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
||||||
"dependencies": {
|
},
|
||||||
"@element-plus/icons-vue": "2.0.10",
|
"dependencies": {
|
||||||
"@vueuse/core": "9.5.0",
|
"@element-plus/icons-vue": "2.0.10",
|
||||||
"axios": "0.27.2",
|
"@vueuse/core": "9.5.0",
|
||||||
"echarts": "5.4.0",
|
"axios": "0.27.2",
|
||||||
"element-plus": "2.2.27",
|
"echarts": "5.4.0",
|
||||||
"file-saver": "2.0.5",
|
"element-plus": "2.2.27",
|
||||||
"fuse.js": "6.6.2",
|
"file-saver": "2.0.5",
|
||||||
"js-cookie": "3.0.1",
|
"fuse.js": "6.6.2",
|
||||||
"jsencrypt": "3.3.1",
|
"js-cookie": "3.0.1",
|
||||||
"nprogress": "0.2.0",
|
"jsencrypt": "3.3.1",
|
||||||
"pinia": "2.0.22",
|
"nprogress": "0.2.0",
|
||||||
"vue": "3.2.45",
|
"pinia": "2.0.22",
|
||||||
"vue-cropper": "1.0.3",
|
"vue": "3.2.45",
|
||||||
"vue-router": "4.1.4"
|
"vue-cropper": "1.0.3",
|
||||||
},
|
"vue-router": "4.1.4"
|
||||||
"devDependencies": {
|
},
|
||||||
"@vitejs/plugin-vue": "3.1.0",
|
"devDependencies": {
|
||||||
"@vue/compiler-sfc": "3.2.45",
|
"@vitejs/plugin-vue": "3.1.0",
|
||||||
"sass": "1.56.1",
|
"@vue/compiler-sfc": "3.2.45",
|
||||||
"unplugin-auto-import": "0.11.4",
|
"prettier": "^2.8.4",
|
||||||
"vite": "3.2.3",
|
"sass": "1.56.1",
|
||||||
"vite-plugin-compression": "0.5.1",
|
"unplugin-auto-import": "0.11.4",
|
||||||
"vite-plugin-svg-icons": "2.0.1",
|
"vite": "3.2.3",
|
||||||
"vite-plugin-vue-setup-extend": "0.4.0"
|
"vite-plugin-compression": "0.5.1",
|
||||||
}
|
"vite-plugin-svg-icons": "2.0.1",
|
||||||
}
|
"vite-plugin-vue-setup-extend": "0.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BIN
src/assets/images/title.png
Normal file
BIN
src/assets/images/title.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -6,10 +6,10 @@
|
|||||||
:rules="loginRules"
|
:rules="loginRules"
|
||||||
class="login-form"
|
class="login-form"
|
||||||
>
|
>
|
||||||
<h3 class="title">木鸢物联平台</h3>
|
<h3 class="title"></h3>
|
||||||
<el-tabs v-model="loginMethod" class="login-method-tabs">
|
<el-tabs v-model="loginMethod" class="login-method-tabs">
|
||||||
<el-tab-pane label="密码登录" name="password"> </el-tab-pane>
|
<el-tab-pane label="密码登录" name="password"></el-tab-pane>
|
||||||
<el-tab-pane label="验证码登录" name="captcha"> </el-tab-pane>
|
<el-tab-pane label="验证码登录" name="captcha"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div v-if="loginMethod === 'password'">
|
<div v-if="loginMethod === 'password'">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
@ -65,8 +65,8 @@
|
|||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="loginForm.rememberMe"
|
v-model="loginForm.rememberMe"
|
||||||
style="margin: 0px 0px 25px 0px"
|
style="margin: 0px 0px 25px 0px"
|
||||||
>记住密码</el-checkbox
|
>记住密码
|
||||||
>
|
</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="loginMethod === 'captcha'">
|
<div v-if="loginMethod === 'captcha'">
|
||||||
<el-form-item prop="phone">
|
<el-form-item prop="phone">
|
||||||
@ -148,15 +148,15 @@
|
|||||||
<div v-if="register" style="text-align: left">
|
<div v-if="register" style="text-align: left">
|
||||||
没有账号?
|
没有账号?
|
||||||
<router-link :to="'/register'" class="link-type"
|
<router-link :to="'/register'" class="link-type"
|
||||||
>立即注册</router-link
|
>立即注册
|
||||||
>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<router-link class="link-type" to="/iforgot"
|
<router-link class="link-type" to="/iforgot"
|
||||||
>忘记密码</router-link
|
>忘记密码
|
||||||
>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -304,9 +304,14 @@ getCookie();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 12px auto;
|
margin: 0 auto 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
height: 32px;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
|
background-image: url("../assets/images/title.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:rules="registerRules"
|
:rules="registerRules"
|
||||||
class="register-form"
|
class="register-form"
|
||||||
>
|
>
|
||||||
<h3 class="title">欢迎来到木鸢物联平台</h3>
|
<h3 class="title">欢迎来到<span></span></h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="registerForm.username"
|
v-model="registerForm.username"
|
||||||
@ -79,6 +79,7 @@
|
|||||||
oninput="value=value.replace(/[^\d]/g,'')"
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
placeholder="请输入短信验证码"
|
placeholder="请输入短信验证码"
|
||||||
size="large"
|
size="large"
|
||||||
|
@keyup.enter="handleRegister"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<svg-icon class="el-input__icon input-icon" icon-class="email" />
|
<svg-icon class="el-input__icon input-icon" icon-class="email" />
|
||||||
@ -87,7 +88,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
:loading="getSMSCodeCountDown > 0"
|
:loading="getSMSCodeCountDown > 0"
|
||||||
link
|
link
|
||||||
type="info"
|
type="primary"
|
||||||
@click="getSMSCode"
|
@click="getSMSCode"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
@ -112,8 +113,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<router-link :to="'/login'" class="link-type"
|
<router-link :to="'/login'" class="link-type"
|
||||||
>使用已有账户登录</router-link
|
>使用已有账户登录
|
||||||
>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -254,9 +255,22 @@ getCode();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 12px auto;
|
margin: 0 auto 12px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
|
height: 32px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
width: calc(32px / 39 * 157);
|
||||||
|
height: 100%;
|
||||||
|
background-image: url("../assets/images/title.png");
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-form {
|
.register-form {
|
||||||
@ -282,6 +296,11 @@ getCode();
|
|||||||
.sms-code-input {
|
.sms-code-input {
|
||||||
:deep(.el-input-group__append) {
|
:deep(.el-input-group__append) {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
116
vite.config.js
116
vite.config.js
@ -1,58 +1,58 @@
|
|||||||
import { defineConfig, loadEnv } from 'vite'
|
import { defineConfig, loadEnv } from "vite";
|
||||||
import path from 'path'
|
import path from "path";
|
||||||
import createVitePlugins from './vite/plugins'
|
import createVitePlugins from "./vite/plugins";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ mode, command }) => {
|
export default defineConfig(({ mode, command }) => {
|
||||||
const env = loadEnv(mode, process.cwd())
|
const env = loadEnv(mode, process.cwd());
|
||||||
const { VITE_APP_ENV } = env
|
const { VITE_APP_ENV } = env;
|
||||||
return {
|
return {
|
||||||
// 部署生产环境和开发环境下的URL。
|
// 部署生产环境和开发环境下的URL。
|
||||||
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
||||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||||
base: VITE_APP_ENV === 'production' ? '/' : '/',
|
base: VITE_APP_ENV === "production" ? "/" : "/",
|
||||||
plugins: createVitePlugins(env, command === 'build'),
|
plugins: createVitePlugins(env, command === "build"),
|
||||||
resolve: {
|
resolve: {
|
||||||
// https://cn.vitejs.dev/config/#resolve-alias
|
// https://cn.vitejs.dev/config/#resolve-alias
|
||||||
alias: {
|
alias: {
|
||||||
// 设置路径
|
// 设置路径
|
||||||
'~': path.resolve(__dirname, './'),
|
"~": path.resolve(__dirname, "./"),
|
||||||
// 设置别名
|
// 设置别名
|
||||||
'@': path.resolve(__dirname, './src')
|
"@": path.resolve(__dirname, "./src"),
|
||||||
},
|
},
|
||||||
// https://cn.vitejs.dev/config/#resolve-extensions
|
// https://cn.vitejs.dev/config/#resolve-extensions
|
||||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
|
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
|
||||||
},
|
},
|
||||||
// vite 相关配置
|
// vite 相关配置
|
||||||
server: {
|
server: {
|
||||||
port: 80,
|
port: 80,
|
||||||
host: true,
|
host: true,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
'/dev-api': {
|
"/dev-api": {
|
||||||
target: 'http://192.168.1.16:1616',
|
target: "http://192.168.1.16:1616",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
|
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
|
||||||
css: {
|
css: {
|
||||||
postcss: {
|
postcss: {
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{
|
||||||
postcssPlugin: 'internal:charset-removal',
|
postcssPlugin: "internal:charset-removal",
|
||||||
AtRule: {
|
AtRule: {
|
||||||
charset: (atRule) => {
|
charset: (atRule) => {
|
||||||
if (atRule.name === 'charset') {
|
if (atRule.name === "charset") {
|
||||||
atRule.remove();
|
atRule.remove();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
import autoImport from 'unplugin-auto-import/vite'
|
import autoImport from "unplugin-auto-import/vite";
|
||||||
|
|
||||||
export default function createAutoImport() {
|
export default function createAutoImport() {
|
||||||
return autoImport({
|
return autoImport({
|
||||||
imports: [
|
imports: ["vue", "vue-router", "pinia"],
|
||||||
'vue',
|
dts: false,
|
||||||
'vue-router',
|
});
|
||||||
'pinia'
|
}
|
||||||
],
|
|
||||||
dts: false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
import compression from 'vite-plugin-compression'
|
import compression from "vite-plugin-compression";
|
||||||
|
|
||||||
export default function createCompression(env) {
|
export default function createCompression(env) {
|
||||||
const { VITE_BUILD_COMPRESS } = env
|
const { VITE_BUILD_COMPRESS } = env;
|
||||||
const plugin = []
|
const plugin = [];
|
||||||
if (VITE_BUILD_COMPRESS) {
|
if (VITE_BUILD_COMPRESS) {
|
||||||
const compressList = VITE_BUILD_COMPRESS.split(',')
|
const compressList = VITE_BUILD_COMPRESS.split(",");
|
||||||
if (compressList.includes('gzip')) {
|
if (compressList.includes("gzip")) {
|
||||||
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
||||||
plugin.push(
|
plugin.push(
|
||||||
compression({
|
compression({
|
||||||
ext: '.gz',
|
ext: ".gz",
|
||||||
deleteOriginFile: false
|
deleteOriginFile: false,
|
||||||
})
|
})
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
if (compressList.includes('brotli')) {
|
if (compressList.includes("brotli")) {
|
||||||
plugin.push(
|
plugin.push(
|
||||||
compression({
|
compression({
|
||||||
ext: '.br',
|
ext: ".br",
|
||||||
algorithm: 'brotliCompress',
|
algorithm: "brotliCompress",
|
||||||
deleteOriginFile: false
|
deleteOriginFile: false,
|
||||||
})
|
})
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return plugin
|
return plugin;
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import vue from '@vitejs/plugin-vue'
|
import vue from "@vitejs/plugin-vue";
|
||||||
|
|
||||||
import createAutoImport from './auto-import'
|
import createAutoImport from "./auto-import";
|
||||||
import createSvgIcon from './svg-icon'
|
import createSvgIcon from "./svg-icon";
|
||||||
import createCompression from './compression'
|
import createCompression from "./compression";
|
||||||
import createSetupExtend from './setup-extend'
|
import createSetupExtend from "./setup-extend";
|
||||||
|
|
||||||
export default function createVitePlugins(viteEnv, isBuild = false) {
|
export default function createVitePlugins(viteEnv, isBuild = false) {
|
||||||
const vitePlugins = [vue()]
|
const vitePlugins = [vue()];
|
||||||
vitePlugins.push(createAutoImport())
|
vitePlugins.push(createAutoImport());
|
||||||
vitePlugins.push(createSetupExtend())
|
vitePlugins.push(createSetupExtend());
|
||||||
vitePlugins.push(createSvgIcon(isBuild))
|
vitePlugins.push(createSvgIcon(isBuild));
|
||||||
isBuild && vitePlugins.push(...createCompression(viteEnv))
|
isBuild && vitePlugins.push(...createCompression(viteEnv));
|
||||||
return vitePlugins
|
return vitePlugins;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import setupExtend from 'vite-plugin-vue-setup-extend'
|
import setupExtend from "vite-plugin-vue-setup-extend";
|
||||||
|
|
||||||
export default function createSetupExtend() {
|
export default function createSetupExtend() {
|
||||||
return setupExtend()
|
return setupExtend();
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
||||||
import path from 'path'
|
import path from "path";
|
||||||
|
|
||||||
export default function createSvgIcon(isBuild) {
|
export default function createSvgIcon(isBuild) {
|
||||||
return createSvgIconsPlugin({
|
return createSvgIconsPlugin({
|
||||||
iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')],
|
iconDirs: [path.resolve(process.cwd(), "src/assets/icons/svg")],
|
||||||
symbolId: 'icon-[dir]-[name]',
|
symbolId: "icon-[dir]-[name]",
|
||||||
svgoOptions: isBuild
|
svgoOptions: isBuild,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user