소스 검색

pref[Sidebar]: refine key

Pan 6 년 전
부모
커밋
691c526458
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/views/layout/components/Sidebar/SidebarItem.vue
  2. 1 1
      src/views/layout/components/Sidebar/index.vue

+ 1 - 1
src/views/layout/components/Sidebar/SidebarItem.vue

@@ -9,7 +9,7 @@
       </app-link>
     </template>
 
-    <el-submenu v-else :index="item.name||item.path">
+    <el-submenu v-else :index="resolvePath(item.path)">
       <template slot="title">
         <item v-if="item.meta" :icon="item.meta.icon" :title="item.meta.title" />
       </template>

+ 1 - 1
src/views/layout/components/Sidebar/index.vue

@@ -9,7 +9,7 @@
       text-color="#bfcbd9"
       active-text-color="#409EFF"
     >
-      <sidebar-item v-for="route in routes" :key="route.name" :item="route" :base-path="route.path"/>
+      <sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path"/>
     </el-menu>
   </el-scrollbar>
 </template>