mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-05 22:25:49 +08:00
fix: Fix menu display exception issue (#9883)
This commit is contained in:
parent
270411f7fd
commit
b3a55ea44d
8 changed files with 14 additions and 19 deletions
|
@ -73,6 +73,8 @@ router.afterEach((to) => {
|
|||
localStorage.setItem('cachedRoute' + to.meta.activeMenu, '/cronjobs/cronjob');
|
||||
} else if (to.meta.activeMenu === '/containers' && to.path === '/containers/container/operate') {
|
||||
localStorage.setItem('cachedRoute' + to.meta.activeMenu, '/containers/container');
|
||||
} else if (to.meta.activeMenu === '/toolbox' && to.path === '/toolbox/clam/setting') {
|
||||
localStorage.setItem('cachedRoute' + to.meta.activeMenu, '/toolbox/clam');
|
||||
} else {
|
||||
localStorage.setItem('cachedRoute' + to.meta.activeMenu, to.path);
|
||||
}
|
||||
|
|
|
@ -53,9 +53,7 @@ const containerRouter = {
|
|||
meta: {
|
||||
activeMenu: '/containers',
|
||||
requiresAuth: false,
|
||||
parent: 'menu.container',
|
||||
title: 'menu.container',
|
||||
detail: 'commons.table.operate',
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -67,9 +65,7 @@ const containerRouter = {
|
|||
meta: {
|
||||
activeMenu: '/containers',
|
||||
requiresAuth: false,
|
||||
parent: 'menu.container',
|
||||
title: 'container.compose',
|
||||
detail: 'commons.button.view',
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -37,8 +37,7 @@ const cronRouter = {
|
|||
meta: {
|
||||
activeMenu: '/cronjobs',
|
||||
requiresAuth: false,
|
||||
title: 'menu.cronjob',
|
||||
detail: 'commons.table.operate',
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -39,9 +39,7 @@ const databaseRouter = {
|
|||
meta: {
|
||||
activeMenu: '/databases',
|
||||
requiresAuth: false,
|
||||
parent: 'menu.database',
|
||||
title: 'MySQL',
|
||||
detail: 'commons.button.set',
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -91,9 +89,7 @@ const databaseRouter = {
|
|||
meta: {
|
||||
activeMenu: '/databases',
|
||||
requiresAuth: false,
|
||||
parent: 'menu.database',
|
||||
title: 'PostgreSQL',
|
||||
detail: 'commons.button.set',
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -110,6 +110,7 @@ const settingRouter = {
|
|||
meta: {
|
||||
requiresAuth: true,
|
||||
activeMenu: 'Expired',
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -60,8 +60,7 @@ const toolboxRouter = {
|
|||
component: () => import('@/views/toolbox/clam/setting/index.vue'),
|
||||
hidden: true,
|
||||
meta: {
|
||||
parent: 'menu.toolbox',
|
||||
title: 'toolbox.device.toolbox',
|
||||
ignoreTab: true,
|
||||
activeMenu: '/toolbox',
|
||||
requiresAuth: false,
|
||||
},
|
||||
|
|
|
@ -27,10 +27,9 @@ const webSiteRouter = {
|
|||
hidden: true,
|
||||
props: true,
|
||||
meta: {
|
||||
parent: 'menu.website',
|
||||
title: 'menu.config',
|
||||
activeMenu: '/websites',
|
||||
requiresAuth: false,
|
||||
ignoreTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -33,8 +33,11 @@ export const routerToNameWithParams = async (name: string, params: any) => {
|
|||
|
||||
const tabStoreMiddleWare = () => {
|
||||
try {
|
||||
const tabsStore = TabsStore();
|
||||
let route = router.currentRoute;
|
||||
if (route.value.meta.ignoreTab) {
|
||||
return;
|
||||
}
|
||||
const tabsStore = TabsStore();
|
||||
tabsStore.addTab(route.value);
|
||||
tabsStore.activeTabPath = route.value?.path;
|
||||
} catch (error) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue