From a856780066bc2ff6f279098655e7bb81cde1bfa9 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Fri, 24 Sep 2021 15:00:52 +0800 Subject: [PATCH] fix the active link problem --- src/router.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/router.js b/src/router.js index 8fc533955..078c446b4 100644 --- a/src/router.js +++ b/src/router.js @@ -17,7 +17,10 @@ const routes = [ component: Entry, }, { - path: "/dashboard", + // If it is "/dashboard", the active link is not working + // If it is "", it overrides the "/" unexpectedly + // Give a random name to solve the problem. + path: "/empty", component: Layout, children: [ { @@ -26,7 +29,7 @@ const routes = [ children: [ { name: "DashboardHome", - path: "", + path: "/dashboard", component: DashboardHome, children: [ {