mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-23 01:20:25 +08:00
fix: 问题修复
This commit is contained in:
@@ -9,6 +9,9 @@
|
|||||||
<img src="https://img.shields.io/github/stars/may-fly/mayfly-go.svg?style=social" alt="github star"/>
|
<img src="https://img.shields.io/github/stars/may-fly/mayfly-go.svg?style=social" alt="github star"/>
|
||||||
<img src="https://img.shields.io/github/forks/may-fly/mayfly-go.svg?style=social" alt="github fork"/>
|
<img src="https://img.shields.io/github/forks/may-fly/mayfly-go.svg?style=social" alt="github fork"/>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://hub.docker.com/r/mayflygo/mayfly-go/tags" target="_blank">
|
||||||
|
<img src="https://img.shields.io/docker/pulls/mayflygo/mayfly-go.svg?label=docker%20pulls&color=fac858" alt="docker pulls"/>
|
||||||
|
</a>
|
||||||
<a href="https://github.com/golang/go" target="_blank">
|
<a href="https://github.com/golang/go" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/Golang-1.18%2B-yellow.svg" alt="golang"/>
|
<img src="https://img.shields.io/badge/Golang-1.18%2B-yellow.svg" alt="golang"/>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
"countup.js": "^2.0.7",
|
"countup.js": "^2.0.7",
|
||||||
"cropperjs": "^1.5.11",
|
"cropperjs": "^1.5.11",
|
||||||
"echarts": "^5.4.0",
|
"echarts": "^5.4.0",
|
||||||
"element-plus": "^2.3.1",
|
"element-plus": "^2.3.2",
|
||||||
"jsencrypt": "^3.3.1",
|
"jsencrypt": "^3.3.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"monaco-editor": "^0.36.1",
|
"monaco-editor": "^0.37.1",
|
||||||
"monaco-sql-languages": "^0.11.0",
|
"monaco-sql-languages": "^0.11.0",
|
||||||
"monaco-themes": "^0.4.2",
|
"monaco-themes": "^0.4.2",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
|||||||
@@ -45,9 +45,6 @@ const state = reactive({
|
|||||||
isShow: false,
|
isShow: false,
|
||||||
dropdownList: [
|
dropdownList: [
|
||||||
{ contextMenuClickId: 0, txt: '刷新', affix: false, icon: 'RefreshRight' },
|
{ contextMenuClickId: 0, txt: '刷新', affix: false, icon: 'RefreshRight' },
|
||||||
{ contextMenuClickId: 1, txt: '关闭', affix: false, icon: 'Close' },
|
|
||||||
{ contextMenuClickId: 2, txt: '关闭其他', affix: false, icon: 'CircleClose' },
|
|
||||||
{ contextMenuClickId: 3, txt: '关闭所有', affix: false, icon: 'FolderDelete' },
|
|
||||||
],
|
],
|
||||||
item: {} as any,
|
item: {} as any,
|
||||||
arrowLeft: 10,
|
arrowLeft: 10,
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
import { reactive, onMounted, computed, ref, nextTick, onBeforeUpdate, onBeforeMount, onUnmounted, getCurrentInstance, watch } from 'vue';
|
import { reactive, onMounted, computed, ref, nextTick, onBeforeUpdate, onBeforeMount, onUnmounted, getCurrentInstance, watch } from 'vue';
|
||||||
import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
|
import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
|
||||||
import screenfull from 'screenfull';
|
import screenfull from 'screenfull';
|
||||||
import pinia from '@/store/index';
|
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useThemeConfig } from '@/store/themeConfig';
|
import { useThemeConfig } from '@/store/themeConfig';
|
||||||
import { getSession, setSession, removeSession } from '@/common/utils/storage.ts';
|
import { getSession, setSession, removeSession } from '@/common/utils/storage.ts';
|
||||||
@@ -52,13 +51,15 @@ const tagsUlRef = ref();
|
|||||||
const { themeConfig } = storeToRefs(useThemeConfig());
|
const { themeConfig } = storeToRefs(useThemeConfig());
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state: any = reactive({
|
|
||||||
|
const state = reactive({
|
||||||
routePath: route.fullPath,
|
routePath: route.fullPath,
|
||||||
dropdown: { x: '', y: '' },
|
dropdown: { x: '', y: '' },
|
||||||
tagsRefsIndex: 0,
|
tagsRefsIndex: 0,
|
||||||
tagsViewList: [],
|
tagsViewList: [] as any,
|
||||||
sortable: '',
|
sortable: '' as any,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 动态设置 tagsView 风格样式
|
// 动态设置 tagsView 风格样式
|
||||||
const setTagsStyle = computed(() => {
|
const setTagsStyle = computed(() => {
|
||||||
return themeConfig.value.tagsStyle;
|
return themeConfig.value.tagsStyle;
|
||||||
@@ -81,7 +82,7 @@ const initTagsView = () => {
|
|||||||
if (getSession('tagsViewList') && themeConfig.value.isCacheTagsView) {
|
if (getSession('tagsViewList') && themeConfig.value.isCacheTagsView) {
|
||||||
state.tagsViewList = getSession('tagsViewList');
|
state.tagsViewList = getSession('tagsViewList');
|
||||||
} else {
|
} else {
|
||||||
state.tagsViews?.map((v: any) => {
|
state.tagsViewList?.map((v: any) => {
|
||||||
if (v.meta.isAffix && !v.meta.isHide) state.tagsViewList.push({ ...v });
|
if (v.meta.isAffix && !v.meta.isHide) state.tagsViewList.push({ ...v });
|
||||||
});
|
});
|
||||||
addTagsView(route.fullPath);
|
addTagsView(route.fullPath);
|
||||||
@@ -127,28 +128,21 @@ const closeCurrentTagsView = (path: string) => {
|
|||||||
if (v.fullPath === path) {
|
if (v.fullPath === path) {
|
||||||
state.tagsViewList.splice(k, 1);
|
state.tagsViewList.splice(k, 1);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (state.tagsViewList.length === k && themeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
|
if (state.routePath !== path) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let next;
|
||||||
// 最后一个且高亮时
|
// 最后一个且高亮时
|
||||||
if (arr[arr.length - 1].meta.isDynamic) {
|
if (state.tagsViewList.length === k) {
|
||||||
// 动态路由(xxx/:id/:name")
|
next = k !== arr.length ? arr[k] : arr[arr.length - 1]
|
||||||
if (k !== arr.length) router.push({ name: arr[k].name, params: arr[k].params });
|
|
||||||
else router.push({ name: arr[arr.length - 1].name, params: arr[arr.length - 1].params });
|
|
||||||
} else {
|
} else {
|
||||||
// 普通路由
|
next = arr[k];
|
||||||
if (k !== arr.length) router.push({ path: arr[k].path, query: arr[k].query });
|
|
||||||
else router.push({ path: arr[arr.length - 1].path, query: arr[arr.length - 1].query });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (next.meta.isDynamic) {
|
||||||
|
router.push({ name: next.name, params: next.params });
|
||||||
} else {
|
} else {
|
||||||
// 非最后一个且高亮时,跳转到下一个
|
router.push({ path: next.path, query: next.query });
|
||||||
if (state.tagsViewList.length !== k && themeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
|
|
||||||
if (arr[k].meta.isDynamic) {
|
|
||||||
// 动态路由(xxx/:id/:name")
|
|
||||||
router.push({ name: arr[k].name, params: arr[k].params });
|
|
||||||
} else {
|
|
||||||
// 普通路由
|
|
||||||
router.push({ path: arr[k].path, query: arr[k].query });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -792,10 +792,10 @@ echarts@^5.4.0:
|
|||||||
tslib "2.3.0"
|
tslib "2.3.0"
|
||||||
zrender "5.4.0"
|
zrender "5.4.0"
|
||||||
|
|
||||||
element-plus@^2.3.1:
|
element-plus@^2.3.2:
|
||||||
version "2.3.1"
|
version "2.3.2"
|
||||||
resolved "https://registry.npmmirror.com/element-plus/-/element-plus-2.3.1.tgz#e4e13c28702709583ab978041145bc1367844842"
|
resolved "https://registry.npmmirror.com/element-plus/-/element-plus-2.3.2.tgz#93abe96bcd5d00e96ef281e8d148391d698fb6e3"
|
||||||
integrity sha512-IBS7ic1mRyDXpOreRkredV4ByZSuax5HPb0zNOHm4qwKC4wm927yQv+Is0JbzxPzCW5zWaV4PLy9/Gl3E3v59w==
|
integrity sha512-NIK0QckKKagdlMm3eLoVoD4Lkfj5ECzpZAxwrRLdm1Yi5qiTU9Guor33+IbIa52z4gHMuhMxgSVS2xAGmjLHsw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@ctrl/tinycolor" "^3.4.1"
|
"@ctrl/tinycolor" "^3.4.1"
|
||||||
"@element-plus/icons-vue" "^2.0.6"
|
"@element-plus/icons-vue" "^2.0.6"
|
||||||
@@ -1400,10 +1400,10 @@ mitt@^3.0.0:
|
|||||||
resolved "https://registry.npmmirror.com/mitt/download/mitt-3.0.0.tgz"
|
resolved "https://registry.npmmirror.com/mitt/download/mitt-3.0.0.tgz"
|
||||||
integrity sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==
|
integrity sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==
|
||||||
|
|
||||||
monaco-editor@^0.36.1:
|
monaco-editor@^0.37.1:
|
||||||
version "0.36.1"
|
version "0.37.1"
|
||||||
resolved "https://registry.npmmirror.com/monaco-editor/-/monaco-editor-0.36.1.tgz#aad528c815605307473a1634612946921d8079b5"
|
resolved "https://registry.npmmirror.com/monaco-editor/-/monaco-editor-0.37.1.tgz#d6f5ffb593e019e74e19bf8a2bdef5a691876f4e"
|
||||||
integrity sha512-/CaclMHKQ3A6rnzBzOADfwdSJ25BFoFT0Emxsc4zYVyav5SkK9iA6lEtIeuN/oRYbwPgviJT+t3l+sjFa28jYg==
|
integrity sha512-jLXEEYSbqMkT/FuJLBZAVWGuhIb4JNwHE9kPTorAVmsdZ4UzHAfgWxLsVtD7pLRFaOwYPhNG9nUCpmFL1t/dIg==
|
||||||
|
|
||||||
monaco-sql-languages@^0.11.0:
|
monaco-sql-languages@^0.11.0:
|
||||||
version "0.11.0"
|
version "0.11.0"
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ require (
|
|||||||
github.com/robfig/cron/v3 v3.0.1 // 定时任务
|
github.com/robfig/cron/v3 v3.0.1 // 定时任务
|
||||||
github.com/sirupsen/logrus v1.9.0
|
github.com/sirupsen/logrus v1.9.0
|
||||||
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
|
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
|
||||||
go.mongodb.org/mongo-driver v1.11.3 // mongo
|
go.mongodb.org/mongo-driver v1.11.4 // mongo
|
||||||
golang.org/x/crypto v0.7.0 // ssh
|
golang.org/x/crypto v0.8.0 // ssh
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
// gorm
|
// gorm
|
||||||
gorm.io/driver/mysql v1.4.7
|
gorm.io/driver/mysql v1.4.7
|
||||||
@@ -55,9 +55,9 @@ require (
|
|||||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
|
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
|
||||||
golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect
|
golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect
|
||||||
golang.org/x/net v0.8.0 // indirect
|
golang.org/x/net v0.9.0 // indirect
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
||||||
golang.org/x/sys v0.6.0 // indirect
|
golang.org/x/sys v0.7.0 // indirect
|
||||||
golang.org/x/text v0.8.0 // indirect
|
golang.org/x/text v0.9.0 // indirect
|
||||||
google.golang.org/protobuf v1.28.1 // indirect
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user