From a9ffb87e69cfcf68da9a6b310ea4d1e9ea5a9499 Mon Sep 17 00:00:00 2001 From: OrangeM21 Date: Wed, 13 May 2020 19:18:42 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E6=B7=BB=E5=8A=A0Xpack=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 3 +++ src/views/Xpack/router.js | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/views/Xpack/router.js diff --git a/src/router/index.js b/src/router/index.js index 5fe0cde4e..8ecdc4372 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,6 +6,7 @@ Vue.use(Router) /* Layout */ import Layout from '@/layout' +const requireContext = require.context('@/views/', true, /router\.js$/) /** * Note: sub-menu only appear when route children.length >= 1 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html @@ -127,6 +128,7 @@ export const adminRoutes = [ meta: { title: 'Audits', icon: 'history' }, children: AuditsRoutes }, + ...requireContext.keys().map(key => requireContext(key).default), { path: '/settings', component: Layout, @@ -146,6 +148,7 @@ export const adminRoutes = [ meta: { title: 'CeleryTaskLog' } }, { path: '*', redirect: '/404', hidden: true } + ] /** * user routes diff --git a/src/views/Xpack/router.js b/src/views/Xpack/router.js new file mode 100644 index 000000000..ba447c7da --- /dev/null +++ b/src/views/Xpack/router.js @@ -0,0 +1,8 @@ +export default { + path: '/Xpack', + component: () => import('@/views/jobcenter/CeleryTaskLog'), + redirect: '/applications/remote-apps/', + name: 'Xpack', + meta: { title: 'Xpack', icon: 'th' } +} +