Browse Source

chore: update

xiaoxian521 1 year ago
parent
commit
46db63e914
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/layout/components/sidebar/logo.vue

+ 2 - 3
src/layout/components/sidebar/logo.vue

@@ -7,7 +7,6 @@ const props = defineProps({
 });
 
 const { title } = useNav();
-const topPath = getTopMenu()?.path;
 </script>
 
 <template>
@@ -18,7 +17,7 @@ const topPath = getTopMenu()?.path;
         key="props.collapse"
         :title="title"
         class="sidebar-logo-link"
-        :to="topPath"
+        :to="getTopMenu()?.path ?? '/'"
       >
         <img src="/logo.svg" alt="logo" />
         <span class="sidebar-title">{{ title }}</span>
@@ -28,7 +27,7 @@ const topPath = getTopMenu()?.path;
         key="expand"
         :title="title"
         class="sidebar-logo-link"
-        :to="topPath"
+        :to="getTopMenu()?.path ?? '/'"
       >
         <img src="/logo.svg" alt="logo" />
         <span class="sidebar-title">{{ title }}</span>