mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-05-04 05:07:52 +08:00
Compare commits
11 Commits
aa5530f51b
...
v3.6.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63a556bd3a | ||
|
|
d94b7d1a5f | ||
|
|
385fc50c19 | ||
|
|
50fc2989ee | ||
|
|
80483dd17c | ||
|
|
ab77b8cb8d | ||
|
|
14e8885fba | ||
|
|
c29f5e2c04 | ||
|
|
b33ea72445 | ||
|
|
543d169827 | ||
|
|
9ddcb875a1 |
@@ -1,11 +1,11 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||||
</p>
|
</p>
|
||||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.7</h1>
|
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.8</h1>
|
||||||
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.7-brightgreen.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.8-brightgreen.svg"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ usage() {
|
|||||||
|
|
||||||
# copy sql
|
# copy sql
|
||||||
echo "begin copy sql "
|
echo "begin copy sql "
|
||||||
cp ../sql/ry_20250523.sql ./mysql/db
|
cp ../sql/ry_20260321.sql ./mysql/db
|
||||||
cp ../sql/ry_config_20260311.sql ./mysql/db
|
cp ../sql/ry_config_20260311.sql ./mysql/db
|
||||||
|
|
||||||
# copy html
|
# copy html
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -6,14 +6,14 @@
|
|||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
<description>若依微服务系统</description>
|
<description>若依微服务系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.6.7</ruoyi.version>
|
<ruoyi.version>3.6.8</ruoyi.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-api</artifactId>
|
<artifactId>ruoyi-api</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -228,11 +230,7 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
@Override
|
@Override
|
||||||
public byte[] downloadCode(String tableName)
|
public byte[] downloadCode(String tableName)
|
||||||
{
|
{
|
||||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
return downloadCode(new String[] { tableName });
|
||||||
ZipOutputStream zip = new ZipOutputStream(outputStream);
|
|
||||||
generatorCode(tableName, zip);
|
|
||||||
IOUtils.closeQuietly(zip);
|
|
||||||
return outputStream.toByteArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -343,9 +341,14 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
{
|
{
|
||||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||||
ZipOutputStream zip = new ZipOutputStream(outputStream);
|
ZipOutputStream zip = new ZipOutputStream(outputStream);
|
||||||
|
Map<String, StringBuffer> typeFiles = new HashMap<>();
|
||||||
for (String tableName : tableNames)
|
for (String tableName : tableNames)
|
||||||
{
|
{
|
||||||
generatorCode(tableName, zip);
|
generatorCode(tableName, zip, typeFiles);
|
||||||
|
}
|
||||||
|
for (Map.Entry<String, StringBuffer> entry : typeFiles.entrySet())
|
||||||
|
{
|
||||||
|
writeToZip(zip, entry.getKey(), entry.getValue().toString());
|
||||||
}
|
}
|
||||||
IOUtils.closeQuietly(zip);
|
IOUtils.closeQuietly(zip);
|
||||||
return outputStream.toByteArray();
|
return outputStream.toByteArray();
|
||||||
@@ -354,7 +357,7 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
/**
|
/**
|
||||||
* 查询表信息并生成代码
|
* 查询表信息并生成代码
|
||||||
*/
|
*/
|
||||||
private void generatorCode(String tableName, ZipOutputStream zip)
|
private void generatorCode(String tableName, ZipOutputStream zip, Map<String, StringBuffer> typeFiles)
|
||||||
{
|
{
|
||||||
// 查询表信息
|
// 查询表信息
|
||||||
GenTable table = genTableMapper.selectGenTableByName(tableName);
|
GenTable table = genTableMapper.selectGenTableByName(tableName);
|
||||||
@@ -375,19 +378,46 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
StringWriter sw = new StringWriter();
|
StringWriter sw = new StringWriter();
|
||||||
Template tpl = Velocity.getTemplate(template, Constants.UTF8);
|
Template tpl = Velocity.getTemplate(template, Constants.UTF8);
|
||||||
tpl.merge(context, sw);
|
tpl.merge(context, sw);
|
||||||
|
String fileName = VelocityUtils.getFileName(template, table);
|
||||||
|
// index-bak.ts 模版,追加内容
|
||||||
|
if (fileName.contains("index-bak.ts"))
|
||||||
|
{
|
||||||
|
if (!typeFiles.containsKey(fileName))
|
||||||
|
{
|
||||||
|
typeFiles.put(fileName, new StringBuffer(sw.toString()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Arrays.stream(sw.toString().split("\n")).filter(line -> line.startsWith("export * from")).forEach(line -> typeFiles.get(fileName).append("\n").append(line));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 其他文件正常添加
|
||||||
|
writeToZip(zip, fileName, sw.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串内容写入ZIP输出流
|
||||||
|
*
|
||||||
|
* @param zip ZIP输出流
|
||||||
|
* @param fileName ZIP条目名称(即文件名)
|
||||||
|
* @param content 要写入的内容
|
||||||
|
*/
|
||||||
|
private void writeToZip(ZipOutputStream zip, String fileName, String content)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 添加到zip
|
zip.putNextEntry(new ZipEntry(fileName));
|
||||||
zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table)));
|
IOUtils.write(content, zip, Constants.UTF8);
|
||||||
IOUtils.write(sw.toString(), zip, Constants.UTF8);
|
|
||||||
IOUtils.closeQuietly(sw);
|
|
||||||
zip.flush();
|
zip.flush();
|
||||||
zip.closeEntry();
|
zip.closeEntry();
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
log.error("渲染模板失败,表名:" + table.getTableName(), e);
|
log.error("写入ZIP文件失败,文件名: " + fileName, e);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.6.7",
|
"version": "3.6.8",
|
||||||
"description": "若依管理系统",
|
"description": "若依管理系统",
|
||||||
"author": "若依",
|
"author": "若依",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"axios": "0.28.1",
|
"axios": "0.30.3",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
"core-js": "3.37.1",
|
"core-js": "3.37.1",
|
||||||
"echarts": "5.4.0",
|
"echarts": "5.4.0",
|
||||||
|
|||||||
@@ -74,6 +74,8 @@
|
|||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
text-overflow: ellipsis !important;
|
text-overflow: ellipsis !important;
|
||||||
white-space: nowrap !important;
|
white-space: nowrap !important;
|
||||||
|
height: 44px !important;
|
||||||
|
line-height: 44px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// menu hover
|
// menu hover
|
||||||
@@ -105,6 +107,96 @@
|
|||||||
background-color: $base-sub-menu-hover !important;
|
background-color: $base-sub-menu-hover !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// theme-dark 深色主题
|
||||||
|
&.theme-dark {
|
||||||
|
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
|
||||||
|
border-right: none;
|
||||||
|
|
||||||
|
.el-menu-item.is-active {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background-color: var(--current-color-dark-bg, rgba(64, 158, 255, 0.2));
|
||||||
|
border-right: 3px solid var(--current-color, #409eff);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-submenu.is-active > .el-submenu__title {
|
||||||
|
color: var(--current-color, #409eff) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-menu-item:not(.is-active),
|
||||||
|
.submenu-title-noDropdown,
|
||||||
|
.el-submenu__title {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover::before {
|
||||||
|
background-color: var(--current-color-dark-bg, rgba(64, 158, 255, 0.2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// theme-light 浅色主题
|
||||||
|
&.theme-light {
|
||||||
|
border-right: 1px solid #e8eaf0;
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
.el-menu-item,
|
||||||
|
.el-submenu__title {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-menu-item.is-active {
|
||||||
|
color: var(--current-color, #409eff) !important;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background-color: var(--current-color-light, #ecf5ff);
|
||||||
|
border-right: 3px solid var(--current-color, #409eff);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-submenu.is-active > .el-submenu__title {
|
||||||
|
color: var(--current-color, #409eff) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-menu-item:not(.is-active):hover,
|
||||||
|
.submenu-title-noDropdown:hover,
|
||||||
|
.el-submenu__title:hover {
|
||||||
|
background-color: #f5f7fa !important;
|
||||||
|
color: rgba(0, 0, 0, 0.85) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nest-menu .el-submenu > .el-submenu__title,
|
||||||
|
.el-submenu .el-menu-item {
|
||||||
|
background-color: #fafafa !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #f0f5ff !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideSidebar {
|
.hideSidebar {
|
||||||
|
|||||||
@@ -9,32 +9,17 @@ $yellow:#FEC171;
|
|||||||
$panGreen: #30B08F;
|
$panGreen: #30B08F;
|
||||||
|
|
||||||
// 默认菜单主题风格
|
// 默认菜单主题风格
|
||||||
$base-menu-color:#bfcbd9;
|
$base-menu-color: #bfcbd9;
|
||||||
$base-menu-color-active:#f4f4f5;
|
$base-menu-color-active: #ffffff;
|
||||||
$base-menu-background:#304156;
|
$base-menu-background: #1a1f2e;
|
||||||
$base-logo-title-color: #ffffff;
|
$base-logo-title-color: #ffffff;
|
||||||
|
|
||||||
$base-menu-light-color:rgba(0,0,0,.70);
|
$base-menu-light-color:rgba(0,0,0,.70);
|
||||||
$base-menu-light-background:#ffffff;
|
$base-menu-light-background:#ffffff;
|
||||||
$base-logo-light-title-color: #001529;
|
$base-logo-light-title-color: #001529;
|
||||||
|
|
||||||
$base-sub-menu-background:#1f2d3d;
|
$base-sub-menu-background: #141824;
|
||||||
$base-sub-menu-hover:#001528;
|
$base-sub-menu-hover: rgba(255,255,255,.06);
|
||||||
|
|
||||||
// 自定义暗色菜单风格
|
|
||||||
/**
|
|
||||||
$base-menu-color:hsla(0,0%,100%,.65);
|
|
||||||
$base-menu-color-active:#fff;
|
|
||||||
$base-menu-background:#001529;
|
|
||||||
$base-logo-title-color: #ffffff;
|
|
||||||
|
|
||||||
$base-menu-light-color:rgba(0,0,0,.70);
|
|
||||||
$base-menu-light-background:#ffffff;
|
|
||||||
$base-logo-light-title-color: #001529;
|
|
||||||
|
|
||||||
$base-sub-menu-background:#000c17;
|
|
||||||
$base-sub-menu-hover:#001528;
|
|
||||||
*/
|
|
||||||
|
|
||||||
$base-sidebar-width: 200px;
|
$base-sidebar-width: 200px;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="600px"
|
width="600px"
|
||||||
@close="close"
|
@close="close"
|
||||||
|
@opened="onDialogOpened"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
@@ -21,24 +22,54 @@
|
|||||||
@keydown.down.native="navigateResult('down')"
|
@keydown.down.native="navigateResult('down')"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
||||||
|
<div class="result-count" v-if="search && options.length > 0">
|
||||||
|
找到 <strong>{{ options.length }}</strong> 个结果
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-scrollbar wrap-class="right-scrollbar-wrapper">
|
<el-scrollbar wrap-class="right-scrollbar-wrapper">
|
||||||
<div class="result-wrap">
|
<div class="result-wrap">
|
||||||
<div class="search-item" v-for="(item, index) in options" :key="item.path" :style="activeStyle(index)" @mouseenter="activeIndex = index" @mouseleave="activeIndex = -1">
|
<template v-if="options.length > 0">
|
||||||
|
<div
|
||||||
|
class="search-item"
|
||||||
|
v-for="(item, index) in options"
|
||||||
|
:key="item.path"
|
||||||
|
:class="{ 'is-active': index === activeIndex }"
|
||||||
|
:style="activeStyle(index)"
|
||||||
|
@mouseenter="activeIndex = index"
|
||||||
|
@mouseleave="activeIndex = -1"
|
||||||
|
>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<svg-icon class="menu-icon" :icon-class="item.icon" />
|
<svg-icon class="menu-icon" :icon-class="item.icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="search-info" @click="change(item)">
|
<div class="search-info" @click="change(item)">
|
||||||
<div class="menu-title">
|
<div class="menu-title" v-html="highlightText(item.title.join(' / '))"></div>
|
||||||
{{ item.title.join(" / ") }}
|
<div class="menu-path" v-html="highlightText(item.path)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-path">
|
<svg-icon icon-class="enter" v-show="index === activeIndex" />
|
||||||
{{ item.path }}
|
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="empty-state" v-else-if="search && options.length === 0">
|
||||||
|
<i class="el-icon-search empty-icon"></i>
|
||||||
|
<p class="empty-text">未找到 "<strong>{{ search }}</strong>" 相关菜单</p>
|
||||||
|
<p class="empty-tip">试试其他关键词或路径</p>
|
||||||
</div>
|
</div>
|
||||||
<svg-icon icon-class="enter" v-show="index === activeIndex"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
|
||||||
|
<div class="search-footer">
|
||||||
|
<span class="shortcut-item">
|
||||||
|
<kbd>↑</kbd><kbd>↓</kbd> 切换
|
||||||
|
</span>
|
||||||
|
<span class="shortcut-item">
|
||||||
|
<kbd>↵</kbd> 选择
|
||||||
|
</span>
|
||||||
|
<span class="shortcut-item">
|
||||||
|
<kbd>Esc</kbd> 关闭
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -83,33 +114,37 @@ export default {
|
|||||||
click() {
|
click() {
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
|
|
||||||
this.options = this.searchPool
|
this.options = this.searchPool
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onDialogOpened() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.headerSearchSelectRef && this.$refs.headerSearchSelectRef.focus()
|
||||||
|
})
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
|
this.$refs.headerSearchSelectRef && this.$refs.headerSearchSelectRef.blur()
|
||||||
this.search = ''
|
this.search = ''
|
||||||
this.options = []
|
this.options = this.searchPool
|
||||||
this.show = false
|
this.show = false
|
||||||
this.activeIndex = -1
|
this.activeIndex = -1
|
||||||
},
|
},
|
||||||
change(val) {
|
change(val) {
|
||||||
const path = val.path
|
const p = val.path
|
||||||
const query = val.query
|
const query = val.query
|
||||||
if(isHttp(val.path)) {
|
if (isHttp(val.path)) {
|
||||||
// http(s):// 路径新窗口打开
|
// http(s):// 路径新窗口打开
|
||||||
const pindex = path.indexOf("http")
|
const pindex = p.indexOf('http')
|
||||||
window.open(path.substr(pindex, path.length), "_blank")
|
window.open(p.substr(pindex, p.length), '_blank')
|
||||||
} else {
|
} else {
|
||||||
if (query) {
|
if (query) {
|
||||||
this.$router.push({ path: path, query: JSON.parse(query) })
|
this.$router.push({ path: p, query: JSON.parse(query) })
|
||||||
} else {
|
} else {
|
||||||
this.$router.push(path)
|
this.$router.push(p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.search = ''
|
this.search = ''
|
||||||
this.options = []
|
this.options = this.searchPool
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.show = false
|
this.show = false
|
||||||
})
|
})
|
||||||
@@ -117,7 +152,7 @@ export default {
|
|||||||
initFuse(list) {
|
initFuse(list) {
|
||||||
this.fuse = new Fuse(list, {
|
this.fuse = new Fuse(list, {
|
||||||
shouldSort: true,
|
shouldSort: true,
|
||||||
threshold: 0.4,
|
threshold: 0.2,
|
||||||
minMatchCharLength: 1,
|
minMatchCharLength: 1,
|
||||||
keys: [{
|
keys: [{
|
||||||
name: 'title',
|
name: 'title',
|
||||||
@@ -128,37 +163,25 @@ export default {
|
|||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// Filter out the routes that can be displayed in the sidebar
|
|
||||||
// And generate the internationalized title
|
|
||||||
generateRoutes(routes, basePath = '/', prefixTitle = []) {
|
generateRoutes(routes, basePath = '/', prefixTitle = []) {
|
||||||
let res = []
|
let res = []
|
||||||
|
|
||||||
for (const router of routes) {
|
for (const router of routes) {
|
||||||
// skip hidden router
|
|
||||||
if (router.hidden) { continue }
|
if (router.hidden) { continue }
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
path: !isHttp(router.path) ? path.resolve(basePath, router.path) : router.path,
|
path: !isHttp(router.path) ? path.resolve(basePath, router.path) : router.path,
|
||||||
title: [...prefixTitle],
|
title: [...prefixTitle],
|
||||||
icon: ''
|
icon: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.meta && router.meta.title) {
|
if (router.meta && router.meta.title) {
|
||||||
data.title = [...data.title, router.meta.title]
|
data.title = [...data.title, router.meta.title]
|
||||||
data.icon = router.meta.icon
|
data.icon = router.meta.icon
|
||||||
|
|
||||||
if (router.redirect !== 'noRedirect') {
|
if (router.redirect !== 'noRedirect') {
|
||||||
// only push the routes with title
|
|
||||||
// special case: need to exclude parent router without redirect
|
|
||||||
res.push(data)
|
res.push(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.query) {
|
if (router.query) {
|
||||||
data.query = router.query
|
data.query = router.query
|
||||||
}
|
}
|
||||||
|
|
||||||
// recursive child routes
|
|
||||||
if (router.children) {
|
if (router.children) {
|
||||||
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
|
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
|
||||||
if (tempRoutes.length >= 1) {
|
if (tempRoutes.length >= 1) {
|
||||||
@@ -171,7 +194,18 @@ export default {
|
|||||||
querySearch(query) {
|
querySearch(query) {
|
||||||
this.activeIndex = -1
|
this.activeIndex = -1
|
||||||
if (query !== '') {
|
if (query !== '') {
|
||||||
this.options = this.fuse.search(query).map((item) => item.item) ?? this.searchPool
|
const q = query.toLowerCase()
|
||||||
|
const pathMatches = this.searchPool.filter(item =>
|
||||||
|
item.path.toLowerCase().includes(q)
|
||||||
|
)
|
||||||
|
const fuseMatches = this.fuse.search(query).map(item => item.item)
|
||||||
|
const merged = [...pathMatches]
|
||||||
|
fuseMatches.forEach(item => {
|
||||||
|
if (!merged.find(m => m.path === item.path)) {
|
||||||
|
merged.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.options = merged
|
||||||
} else {
|
} else {
|
||||||
this.options = this.searchPool
|
this.options = this.searchPool
|
||||||
}
|
}
|
||||||
@@ -179,14 +213,14 @@ export default {
|
|||||||
activeStyle(index) {
|
activeStyle(index) {
|
||||||
if (index !== this.activeIndex) return {}
|
if (index !== this.activeIndex) return {}
|
||||||
return {
|
return {
|
||||||
"background-color": this.theme,
|
'background-color': this.theme,
|
||||||
"color": "#fff"
|
'color': '#fff'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
navigateResult(direction) {
|
navigateResult(direction) {
|
||||||
if (direction === "up") {
|
if (direction === 'up') {
|
||||||
this.activeIndex = this.activeIndex <= 0 ? this.options.length - 1 : this.activeIndex - 1
|
this.activeIndex = this.activeIndex <= 0 ? this.options.length - 1 : this.activeIndex - 1
|
||||||
} else if (direction === "down") {
|
} else if (direction === 'down') {
|
||||||
this.activeIndex = this.activeIndex >= this.options.length - 1 ? 0 : this.activeIndex + 1
|
this.activeIndex = this.activeIndex >= this.options.length - 1 ? 0 : this.activeIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -194,6 +228,16 @@ export default {
|
|||||||
if (this.options.length > 0 && this.activeIndex >= 0) {
|
if (this.options.length > 0 && this.activeIndex >= 0) {
|
||||||
this.change(this.options[this.activeIndex])
|
this.change(this.options[this.activeIndex])
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
highlightText(text) {
|
||||||
|
if (!text) return ''
|
||||||
|
if (!this.search) return text
|
||||||
|
const keyword = this.escapeRegExp(this.search)
|
||||||
|
const reg = new RegExp(`(${keyword})`, 'gi')
|
||||||
|
return text.replace(reg, '<span class="highlight">$1</span>')
|
||||||
|
},
|
||||||
|
escapeRegExp(str) {
|
||||||
|
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -202,7 +246,17 @@ export default {
|
|||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
padding: 0 !important;
|
padding: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
color: red;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-active .highlight {
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,19 +268,33 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.result-count {
|
||||||
|
padding: 6px 16px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #aaa;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
color: red;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.result-wrap {
|
.result-wrap {
|
||||||
height: 280px;
|
height: 280px;
|
||||||
margin: 6px 0;
|
margin: 4px 0;
|
||||||
|
|
||||||
.search-item {
|
.search-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: background 0.15s;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
.menu-icon {
|
.menu-icon {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
@@ -242,11 +310,16 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.menu-title,
|
.menu-title,
|
||||||
.menu-path {
|
.menu-path {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-path {
|
.menu-path {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
@@ -257,6 +330,68 @@ export default {
|
|||||||
.search-item:hover {
|
.search-item:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.empty-icon {
|
||||||
|
font-size: 42px;
|
||||||
|
color: #e0e0e0;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
margin: 0 0 6px;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-tip {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #bbb;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-footer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 28px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-top: 1px solid #f0f0f0;
|
||||||
|
color: #999;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
.shortcut-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #f7f7f7;
|
||||||
|
color: #555;
|
||||||
|
font-size: 11px;
|
||||||
|
font-family: inherit;
|
||||||
|
line-height: 1;
|
||||||
|
box-shadow: 0 1px 0 #ccc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,11 @@
|
|||||||
<el-switch v-model="tagsView" class="drawer-switch" />
|
<el-switch v-model="tagsView" class="drawer-switch" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-item">
|
||||||
|
<span>持久化标签页</span>
|
||||||
|
<el-switch v-model="tagsViewPersist" :disabled="!tagsView" class="drawer-switch" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="drawer-item">
|
<div class="drawer-item">
|
||||||
<span>显示页签图标</span>
|
<span>显示页签图标</span>
|
||||||
<el-switch v-model="tagsIcon" :disabled="!tagsView" class="drawer-switch" />
|
<el-switch v-model="tagsIcon" :disabled="!tagsView" class="drawer-switch" />
|
||||||
@@ -125,6 +130,17 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tagsViewPersist: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.settings.tagsViewPersist
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$store.dispatch('settings/changeSetting', {
|
||||||
|
key: 'tagsViewPersist',
|
||||||
|
value: val
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
tagsView: {
|
tagsView: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.tagsView
|
return this.$store.state.settings.tagsView
|
||||||
@@ -231,12 +247,16 @@ export default {
|
|||||||
},
|
},
|
||||||
saveSetting() {
|
saveSetting() {
|
||||||
this.$modal.loading("正在保存到本地,请稍候...")
|
this.$modal.loading("正在保存到本地,请稍候...")
|
||||||
|
if (!this.tagsViewPersist) {
|
||||||
|
this.$cache.local.remove('tags-view-visited')
|
||||||
|
}
|
||||||
this.$cache.local.set(
|
this.$cache.local.set(
|
||||||
"layout-setting",
|
"layout-setting",
|
||||||
`{
|
`{
|
||||||
"navType":${this.navType},
|
"navType":${this.navType},
|
||||||
"tagsView":${this.tagsView},
|
"tagsView":${this.tagsView},
|
||||||
"tagsIcon":${this.tagsIcon},
|
"tagsIcon":${this.tagsIcon},
|
||||||
|
"tagsViewPersist":${this.tagsViewPersist},
|
||||||
"fixedHeader":${this.fixedHeader},
|
"fixedHeader":${this.fixedHeader},
|
||||||
"sidebarLogo":${this.sidebarLogo},
|
"sidebarLogo":${this.sidebarLogo},
|
||||||
"dynamicTitle":${this.dynamicTitle},
|
"dynamicTitle":${this.dynamicTitle},
|
||||||
@@ -249,6 +269,7 @@ export default {
|
|||||||
},
|
},
|
||||||
resetSetting() {
|
resetSetting() {
|
||||||
this.$modal.loading("正在清除设置缓存并刷新,请稍候...")
|
this.$modal.loading("正在清除设置缓存并刷新,请稍候...")
|
||||||
|
this.$cache.local.remove('tags-view-visited')
|
||||||
this.$cache.local.remove("layout-setting")
|
this.$cache.local.remove("layout-setting")
|
||||||
setTimeout("window.location.reload()", 1000)
|
setTimeout("window.location.reload()", 1000)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
<div :class="['sidebar-theme-wrapper', {'has-logo':showLogo}, settings.sideTheme]" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
||||||
<el-menu
|
<el-menu
|
||||||
|
|||||||
@@ -36,18 +36,21 @@
|
|||||||
<i class="el-icon-arrow-down" />
|
<i class="el-icon-arrow-down" />
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown" class="tags-dropdown-menu">
|
<el-dropdown-menu slot="dropdown" class="tags-dropdown-menu">
|
||||||
<el-dropdown-item command="refresh" icon="el-icon-refresh-right">刷新页面</el-dropdown-item>
|
|
||||||
<el-dropdown-item v-if="!isAffix(selectedDropdownTag)" command="close" icon="el-icon-close">关闭当前</el-dropdown-item>
|
<el-dropdown-item v-if="!isAffix(selectedDropdownTag)" command="close" icon="el-icon-close">关闭当前</el-dropdown-item>
|
||||||
<el-dropdown-item command="closeOthers" icon="el-icon-circle-close">关闭其他</el-dropdown-item>
|
<el-dropdown-item command="closeOthers" icon="el-icon-circle-close">关闭其他</el-dropdown-item>
|
||||||
<el-dropdown-item command="closeLeft" :disabled="isFirstView()" icon="el-icon-back">关闭左侧</el-dropdown-item>
|
<el-dropdown-item command="closeLeft" :disabled="isFirstView()" icon="el-icon-back">关闭左侧</el-dropdown-item>
|
||||||
<el-dropdown-item command="closeRight" :disabled="isLastView()" icon="el-icon-right">关闭右侧</el-dropdown-item>
|
<el-dropdown-item command="closeRight" :disabled="isLastView()" icon="el-icon-right">关闭右侧</el-dropdown-item>
|
||||||
<el-dropdown-item command="closeAll" icon="el-icon-circle-close" divided>全部关闭</el-dropdown-item>
|
<el-dropdown-item command="closeAll" icon="el-icon-circle-close">全部关闭</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="fullscreen" divided>
|
||||||
|
<template v-if="!isFullscreen"><i class="el-icon-full-screen"></i>全屏显示</template>
|
||||||
|
<template v-else><i class="el-icon-close"></i>退出全屏</template>
|
||||||
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
||||||
<!-- 全屏按钮 -->
|
<!-- 刷新按钮 -->
|
||||||
<span class="tags-action-btn tags-fullscreen-btn" :title="isFullscreen ? '退出全屏' : '全屏'" @click="toggleFullscreen">
|
<span class="tags-action-btn tags-refresh-btn" title="刷新页面" @click="refreshSelectedTag(selectedDropdownTag)">
|
||||||
<i :class="isFullscreen ? 'el-icon-aim' : 'el-icon-full-screen'" />
|
<i class="el-icon-refresh-right" /> 刷新
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- 右键上下文菜单 -->
|
<!-- 右键上下文菜单 -->
|
||||||
@@ -77,7 +80,8 @@ export default {
|
|||||||
affixTags: [],
|
affixTags: [],
|
||||||
canScrollLeft: false,
|
canScrollLeft: false,
|
||||||
canScrollRight: false,
|
canScrollRight: false,
|
||||||
isFullscreen: false
|
isFullscreen: false,
|
||||||
|
hiddenElements: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -119,13 +123,19 @@ export default {
|
|||||||
this.initTags()
|
this.initTags()
|
||||||
this.addTags()
|
this.addTags()
|
||||||
window.addEventListener('resize', this.updateArrowState)
|
window.addEventListener('resize', this.updateArrowState)
|
||||||
document.addEventListener('fullscreenchange', this.onFullscreenChange)
|
window.addEventListener('keydown', this.handleKeyDown)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('resize', this.updateArrowState)
|
window.removeEventListener('resize', this.updateArrowState)
|
||||||
document.removeEventListener('fullscreenchange', this.onFullscreenChange)
|
window.removeEventListener('keydown', this.handleKeyDown)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleKeyDown(event) {
|
||||||
|
// 当按下Esc键且处于全屏状态时,退出全屏
|
||||||
|
if (event.key === 'Escape' && this.isFullscreen) {
|
||||||
|
this.toggleFullscreen()
|
||||||
|
}
|
||||||
|
},
|
||||||
isActive(route) {
|
isActive(route) {
|
||||||
return route.path === this.$route.path
|
return route.path === this.$route.path
|
||||||
},
|
},
|
||||||
@@ -177,10 +187,13 @@ export default {
|
|||||||
return tags
|
return tags
|
||||||
},
|
},
|
||||||
initTags() {
|
initTags() {
|
||||||
|
if (this.$store.state.settings.tagsViewPersist) {
|
||||||
|
this.$store.dispatch('tagsView/loadPersistedViews')
|
||||||
|
}
|
||||||
const affixTags = this.affixTags = this.filterAffixTags(this.routes)
|
const affixTags = this.affixTags = this.filterAffixTags(this.routes)
|
||||||
for (const tag of affixTags) {
|
for (const tag of affixTags) {
|
||||||
if (tag.name) {
|
if (tag.name) {
|
||||||
this.$store.dispatch('tagsView/addVisitedView', tag)
|
this.$store.dispatch('tagsView/addAffixView', tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -222,17 +235,39 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
toggleFullscreen() {
|
toggleFullscreen() {
|
||||||
if (!document.fullscreenElement) {
|
const mainContainer = document.querySelector('.main-container')
|
||||||
const appMain = document.querySelector('.app-main')
|
const navbar = document.querySelector('.navbar')
|
||||||
if (appMain) {
|
const sidebar = document.querySelector('.sidebar-container')
|
||||||
appMain.requestFullscreen()
|
if (!mainContainer) return
|
||||||
|
|
||||||
|
if (!this.isFullscreen) {
|
||||||
|
mainContainer.classList.add('fullscreen-mode')
|
||||||
|
document.body.style.overflow = 'hidden'
|
||||||
|
const elementsToHide = [
|
||||||
|
{ el: navbar, originalDisplay: (navbar && navbar.style.display) || '' },
|
||||||
|
{ el: sidebar, originalDisplay: (sidebar && sidebar.style.display) || '' }
|
||||||
|
]
|
||||||
|
elementsToHide.forEach(item => {
|
||||||
|
if (item.el && item.el.style.display !== 'none') {
|
||||||
|
item.originalDisplay = item.el.style.display
|
||||||
|
item.el.style.display = 'none'
|
||||||
|
this.hiddenElements.push(item)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
this.isFullscreen = true
|
||||||
} else {
|
} else {
|
||||||
document.exitFullscreen()
|
mainContainer.classList.remove('fullscreen-mode')
|
||||||
|
document.body.style.overflow = ''
|
||||||
|
this.hiddenElements.forEach(item => {
|
||||||
|
if (item.el) {
|
||||||
|
item.el.style.display = item.originalDisplay
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.hiddenElements = []
|
||||||
|
const btn = document.querySelector('.tags-action-btn')
|
||||||
|
if (btn) btn.blur()
|
||||||
|
this.isFullscreen = false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onFullscreenChange() {
|
|
||||||
this.isFullscreen = !!document.fullscreenElement
|
|
||||||
},
|
},
|
||||||
handleDropdownCommand(command) {
|
handleDropdownCommand(command) {
|
||||||
const tag = this.selectedDropdownTag
|
const tag = this.selectedDropdownTag
|
||||||
@@ -241,6 +276,9 @@ export default {
|
|||||||
case 'refresh':
|
case 'refresh':
|
||||||
this.refreshSelectedTag(tag)
|
this.refreshSelectedTag(tag)
|
||||||
break
|
break
|
||||||
|
case 'fullscreen':
|
||||||
|
this.toggleFullscreen()
|
||||||
|
break
|
||||||
case 'close':
|
case 'close':
|
||||||
this.closeSelectedTag(tag)
|
this.closeSelectedTag(tag)
|
||||||
break
|
break
|
||||||
@@ -392,6 +430,7 @@ export default {
|
|||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
&:first-of-type {
|
&:first-of-type {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
@@ -446,8 +485,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags-fullscreen-btn {
|
.tags-refresh-btn {
|
||||||
border-left: $divider;
|
width: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contextmenu {
|
.contextmenu {
|
||||||
@@ -498,4 +537,41 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 页签全屏模式样式 */
|
||||||
|
.main-container.fullscreen-mode {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container.fullscreen-mode .fixed-header {
|
||||||
|
display: block !important;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100% !important;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container.fullscreen-mode .fixed-header .navbar {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container.fullscreen-mode .app-main {
|
||||||
|
position: fixed;
|
||||||
|
top: 34px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
height: calc(100vh - 34px) !important;
|
||||||
|
min-height: calc(100vh - 34px) !important;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
|
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme, '--current-color-light': theme + '1a', '--current-color-dark-bg': theme + '33'}">
|
||||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
||||||
<sidebar v-if="!sidebar.hide" class="sidebar-container"/>
|
<sidebar v-if="!sidebar.hide" class="sidebar-container"/>
|
||||||
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
|
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ export default {
|
|||||||
// 刷新当前tab页签
|
// 刷新当前tab页签
|
||||||
refreshPage(obj) {
|
refreshPage(obj) {
|
||||||
const { path, query, matched } = router.currentRoute
|
const { path, query, matched } = router.currentRoute
|
||||||
|
// 防止在重定向过程中重复刷新
|
||||||
|
if (path.startsWith('/redirect/')) {
|
||||||
|
return Promise.resolve()
|
||||||
|
}
|
||||||
if (obj === undefined) {
|
if (obj === undefined) {
|
||||||
matched.forEach((m) => {
|
matched.forEach((m) => {
|
||||||
if (m.components && m.components.default && m.components.default.name) {
|
if (m.components && m.components.default && m.components.default.name) {
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
tagsView: true,
|
tagsView: true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持久化标签页
|
||||||
|
*/
|
||||||
|
tagsViewPersist: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示页签图标
|
* 显示页签图标
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import defaultSettings from '@/settings'
|
import defaultSettings from '@/settings'
|
||||||
import { useDynamicTitle } from '@/utils/dynamicTitle'
|
import { useDynamicTitle } from '@/utils/dynamicTitle'
|
||||||
|
|
||||||
const { sideTheme, showSettings, navType, tagsView, tagsIcon, fixedHeader, sidebarLogo, dynamicTitle, footerVisible, footerContent } = defaultSettings
|
const { sideTheme, showSettings, navType, tagsView, tagsViewPersist, tagsIcon, fixedHeader, sidebarLogo, dynamicTitle, footerVisible, footerContent } = defaultSettings
|
||||||
|
|
||||||
const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
|
const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
|
||||||
const state = {
|
const state = {
|
||||||
@@ -11,6 +11,7 @@ const state = {
|
|||||||
showSettings: showSettings,
|
showSettings: showSettings,
|
||||||
navType: storageSetting.navType === undefined ? navType : storageSetting.navType,
|
navType: storageSetting.navType === undefined ? navType : storageSetting.navType,
|
||||||
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
|
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
|
||||||
|
tagsViewPersist: storageSetting.tagsViewPersist === undefined ? tagsViewPersist : storageSetting.tagsViewPersist,
|
||||||
tagsIcon: storageSetting.tagsIcon === undefined ? tagsIcon : storageSetting.tagsIcon,
|
tagsIcon: storageSetting.tagsIcon === undefined ? tagsIcon : storageSetting.tagsIcon,
|
||||||
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
||||||
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
||||||
|
|||||||
@@ -1,3 +1,26 @@
|
|||||||
|
import store from '@/store'
|
||||||
|
import cache from '@/plugins/cache'
|
||||||
|
|
||||||
|
const PERSIST_KEY = 'tags-view-visited'
|
||||||
|
|
||||||
|
function isPersistEnabled() {
|
||||||
|
return store.state.settings.tagsViewPersist
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveVisitedViews(views) {
|
||||||
|
if (!isPersistEnabled()) return
|
||||||
|
const toSave = views.filter(v => !(v.meta && v.meta.affix)).map(v => ({ path: v.path, fullPath: v.fullPath, name: v.name, title: v.title, query: v.query, meta: v.meta }))
|
||||||
|
cache.local.setJSON(PERSIST_KEY, toSave)
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadVisitedViews() {
|
||||||
|
return cache.local.getJSON(PERSIST_KEY) || []
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearVisitedViews() {
|
||||||
|
cache.local.remove(PERSIST_KEY)
|
||||||
|
}
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
visitedViews: [],
|
visitedViews: [],
|
||||||
cachedViews: [],
|
cachedViews: [],
|
||||||
@@ -20,6 +43,15 @@ const mutations = {
|
|||||||
title: view.meta.title || 'no-name'
|
title: view.meta.title || 'no-name'
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
saveVisitedViews(state.visitedViews)
|
||||||
|
},
|
||||||
|
ADD_VISITED_VIEW_FIRST: (state, view) => {
|
||||||
|
if (state.visitedViews.some(v => v.path === view.path)) return
|
||||||
|
state.visitedViews.unshift(
|
||||||
|
Object.assign({}, view, {
|
||||||
|
title: view.meta.title || 'no-name'
|
||||||
|
})
|
||||||
|
)
|
||||||
},
|
},
|
||||||
ADD_CACHED_VIEW: (state, view) => {
|
ADD_CACHED_VIEW: (state, view) => {
|
||||||
if (state.cachedViews.includes(view.name)) return
|
if (state.cachedViews.includes(view.name)) return
|
||||||
@@ -35,6 +67,7 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
|
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
|
||||||
|
saveVisitedViews(state.visitedViews)
|
||||||
},
|
},
|
||||||
DEL_IFRAME_VIEW: (state, view) => {
|
DEL_IFRAME_VIEW: (state, view) => {
|
||||||
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
|
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
|
||||||
@@ -49,6 +82,7 @@ const mutations = {
|
|||||||
return v.meta.affix || v.path === view.path
|
return v.meta.affix || v.path === view.path
|
||||||
})
|
})
|
||||||
state.iframeViews = state.iframeViews.filter(item => item.path === view.path)
|
state.iframeViews = state.iframeViews.filter(item => item.path === view.path)
|
||||||
|
saveVisitedViews(state.visitedViews)
|
||||||
},
|
},
|
||||||
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
||||||
const index = state.cachedViews.indexOf(view.name)
|
const index = state.cachedViews.indexOf(view.name)
|
||||||
@@ -63,6 +97,7 @@ const mutations = {
|
|||||||
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
|
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
|
||||||
state.visitedViews = affixTags
|
state.visitedViews = affixTags
|
||||||
state.iframeViews = []
|
state.iframeViews = []
|
||||||
|
clearVisitedViews()
|
||||||
},
|
},
|
||||||
DEL_ALL_CACHED_VIEWS: state => {
|
DEL_ALL_CACHED_VIEWS: state => {
|
||||||
state.cachedViews = []
|
state.cachedViews = []
|
||||||
@@ -94,6 +129,7 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
saveVisitedViews(state.visitedViews)
|
||||||
},
|
},
|
||||||
DEL_LEFT_VIEWS: (state, view) => {
|
DEL_LEFT_VIEWS: (state, view) => {
|
||||||
const index = state.visitedViews.findIndex(v => v.path === view.path)
|
const index = state.visitedViews.findIndex(v => v.path === view.path)
|
||||||
@@ -114,6 +150,7 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
saveVisitedViews(state.visitedViews)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,6 +165,9 @@ const actions = {
|
|||||||
addVisitedView({ commit }, view) {
|
addVisitedView({ commit }, view) {
|
||||||
commit('ADD_VISITED_VIEW', view)
|
commit('ADD_VISITED_VIEW', view)
|
||||||
},
|
},
|
||||||
|
addAffixView({ commit }, view) {
|
||||||
|
commit('ADD_VISITED_VIEW_FIRST', view)
|
||||||
|
},
|
||||||
addCachedView({ commit }, view) {
|
addCachedView({ commit }, view) {
|
||||||
commit('ADD_CACHED_VIEW', view)
|
commit('ADD_CACHED_VIEW', view)
|
||||||
},
|
},
|
||||||
@@ -218,6 +258,13 @@ const actions = {
|
|||||||
resolve([...state.visitedViews])
|
resolve([...state.visitedViews])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 恢复持久化的 tags
|
||||||
|
loadPersistedViews({ commit }) {
|
||||||
|
const views = loadVisitedViews()
|
||||||
|
views.forEach(view => {
|
||||||
|
commit('ADD_VISITED_VIEW', view)
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -108,6 +108,41 @@
|
|||||||
<span>更新日志</span>
|
<span>更新日志</span>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse accordion>
|
<el-collapse accordion>
|
||||||
|
<el-collapse-item title="v3.6.8 - 2026-03-30">
|
||||||
|
<ol>
|
||||||
|
<li>新增锁定屏幕功能</li>
|
||||||
|
<li>首页新增通知公告消息提醒</li>
|
||||||
|
<li>添加持久化标签页开关功能</li>
|
||||||
|
<li>菜单搜索支持文本高亮&数量提示</li>
|
||||||
|
<li>添加菜单路由地址和名称的校验规则</li>
|
||||||
|
<li>字典类型列表新增抽屉效果详细信息</li>
|
||||||
|
<li>升级axios到最新版本0.30.3</li>
|
||||||
|
<li>升级spring-cloud到最新版2025.1.0</li>
|
||||||
|
<li>升级spring-cloud-alibaba到最新版2025.1.0.0</li>
|
||||||
|
<li>升级spring-boot-admin到最新版4.0.2</li>
|
||||||
|
<li>升级dynamic-ds到最新版本4.5.0</li>
|
||||||
|
<li>升级springdoc到最新版本3.0.2</li>
|
||||||
|
<li>升级transmittable-thread-local到最新版本2.14.5</li>
|
||||||
|
<li>升级spring-boot到最新版本4.0.3</li>
|
||||||
|
<li>升级druid到最新版本1.2.28</li>
|
||||||
|
<li>升级pagehelper到最新版2.1.1</li>
|
||||||
|
<li>优化操作日志详细页面</li>
|
||||||
|
<li>部门管理支持批量保存排序</li>
|
||||||
|
<li>菜单管理支持批量保存排序</li>
|
||||||
|
<li>菜单管理列表新增类型显示</li>
|
||||||
|
<li>代码生成模板支持TypeScript版本</li>
|
||||||
|
<li>优化菜单主题风格显示</li>
|
||||||
|
<li>优化点击任务名称查看详细</li>
|
||||||
|
<li>优化字典类型属性提醒说明</li>
|
||||||
|
<li>优化防重提交间隔时间可自定义</li>
|
||||||
|
<li>优化页签功能&支持全屏按钮操作</li>
|
||||||
|
<li>优化RightToolbar搜索栏切换动画</li>
|
||||||
|
<li>修复Excel自定义格式样式污染问题</li>
|
||||||
|
<li>优化isAdmin方法统一到SecurityUtils</li>
|
||||||
|
<li>优化定时任务详情页展示&补充执行时间字段</li>
|
||||||
|
<li>其他细节优化</li>
|
||||||
|
</ol>
|
||||||
|
</el-collapse-item>
|
||||||
<el-collapse-item title="v3.6.7 - 2025-12-22">
|
<el-collapse-item title="v3.6.7 - 2025-12-22">
|
||||||
<ol>
|
<ol>
|
||||||
<li>支持防盗链功能</li>
|
<li>支持防盗链功能</li>
|
||||||
@@ -987,7 +1022,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 版本号
|
// 版本号
|
||||||
version: "3.6.7"
|
version: "3.6.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -66,10 +66,19 @@
|
|||||||
:default-expand-all="isExpandAll"
|
:default-expand-all="isExpandAll"
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
>
|
>
|
||||||
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="220">
|
||||||
<el-table-column prop="icon" label="图标" align="center" width="100">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<svg-icon :icon-class="scope.row.icon" />
|
<svg-icon :icon-class="scope.row.icon" />
|
||||||
|
<span class="ml5">{{ scope.row.menuName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="menuName" label="类型" :show-overflow-tooltip="true" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.menuType === 'M' && scope.row.isFrame === '0'" type="danger" size="small">外链</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.menuType === 'M'" type="primary" size="small">目录</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.menuType === 'C' && scope.row.isFrame === '0'" type="danger" size="small">外链</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.menuType === 'C'" type="success" size="small">菜单</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.menuType === 'F'" type="warning" size="small">按钮</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderNum" label="排序" width="200">
|
<el-table-column prop="orderNum" label="排序" width="200">
|
||||||
@@ -77,16 +86,11 @@
|
|||||||
<el-input-number v-model="scope.row.orderNum" controls-position="right" :min="0" size="mini" style="width: 88px" />
|
<el-input-number v-model="scope.row.orderNum" controls-position="right" :min="0" size="mini" style="width: 88px" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="status" label="状态" width="80">
|
<el-table-column prop="status" label="状态" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-visual</artifactId>
|
<artifactId>ruoyi-visual</artifactId>
|
||||||
<version>3.6.7</version>
|
<version>3.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user