From 86405ba0ebb573d90be95ae98cd4b7faaa36f739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Mon, 12 Apr 2021 22:28:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A6=96=E9=A1=B5=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/utils/util.js | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/jshERP-web/src/utils/util.js b/jshERP-web/src/utils/util.js index f6cb36c4..97e3aa80 100644 --- a/jshERP-web/src/utils/util.js +++ b/jshERP-web/src/utils/util.js @@ -82,23 +82,17 @@ export function formatDate(value, fmt) { // 生成首页路由 export function generateIndexRouter(data) { let indexRouter = generateChildRouters(data) -// let indexRouter = [{ -// path: '/', -// name: 'dashboard', -// //component: () => import('@/components/layouts/BasicLayout'), -// component: resolve => require(['@/components/layouts/TabLayout'], resolve), -// meta: { -// title: '首页', -// icon: 'icon-present' -// }, -// redirect: '/dashboard/analysis', -// children: [ -// ...generateChildRouters(data) -// ] -// }, -// { -// "path": "*", "redirect": "/404", "hidden": true -// }] + indexRouter.splice(0,0, { + path: '/', + name: '首页', + component: () => import('@/components/layouts/TabLayout'), + meta: { + title: '首页', + icon: 'icon-present', + url: '/dashboard/analysis' + }, + redirect: '/dashboard/analysis' + }) return indexRouter; }