File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4747 <li class =" nav-item text-uppercase" v-for =" route in routes" :key =" route.path" >
4848 <router-link :to =" route.path" class =" nav-link" :title =" route.children[0].name"
4949 :class =" { active: isActive(route.path) }" >
50- <i class =" bi bi-house-fill" v-if =" route.path === '/' " ></i >
51- {{ route.path !== "/" ? route.children[0].name : "" }}
50+ <i class =" bi bi-house-fill" v-if =" route.path === `${siteUrl}/` " ></i >
51+ {{ route.path !== `${siteUrl}/` ? route.children[0].name : "" }}
5252 </router-link >
5353 </li >
5454 </ul >
@@ -63,6 +63,8 @@ import { computed } from "vue";
6363import { useRouter } from " vue-router" ;
6464import { routes } from " @/router" ;
6565
66+ const siteUrl = import .meta .env .VITE_BUILD_ADDRESS ;
67+
6668const router = useRouter ();
6769const activeRoute = computed (() => router .currentRoute .value .path );
6870const isActive = (path : string ) => path === activeRoute .value ;
You can’t perform that action at this time.
0 commit comments