| 
														
															@@ -3,8 +3,6 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   <a-layout-sider 
														 | 
														
														 | 
														
															   <a-layout-sider 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     breakpoint="lg" 
														 | 
														
														 | 
														
															     breakpoint="lg" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     collapsed-width="80" 
														 | 
														
														 | 
														
															     collapsed-width="80" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    @collapse="onCollapse" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    @breakpoint="onBreakpoint" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   > 
														 | 
														
														 | 
														
															   > 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <div 
														 | 
														
														 | 
														
															     <div 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       class="logo" 
														 | 
														
														 | 
														
															       class="logo" 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -17,41 +15,46 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       theme="dark" 
														 | 
														
														 | 
														
															       theme="dark" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       mode="inline" 
														 | 
														
														 | 
														
															       mode="inline" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     > 
														 | 
														
														 | 
														
															     > 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      <a-menu-item key="1"> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      <a-menu-item 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        v-for="menu in menus" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        :key="menu.name" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        @click="toPageHandle(menu.name)" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      > 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <user-outlined /> 
														 | 
														
														 | 
														
															         <user-outlined /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <span class="nav-text">nav 1</span> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      </a-menu-item> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      <a-menu-item key="2"> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <video-camera-outlined /> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <span class="nav-text">nav 2</span> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      </a-menu-item> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      <a-menu-item key="3"> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <upload-outlined /> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <span class="nav-text">nav 3</span> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      </a-menu-item> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      <a-menu-item key="4"> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <user-outlined /> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        <span class="nav-text">nav 4</span> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        <span class="nav-text">{{ menu.name }}</span> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       </a-menu-item> 
														 | 
														
														 | 
														
															       </a-menu-item> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </a-menu> 
														 | 
														
														 | 
														
															     </a-menu> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   </a-layout-sider> 
														 | 
														
														 | 
														
															   </a-layout-sider> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 </template> 
														 | 
														
														 | 
														
															 </template> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 <script lang="ts" setup> 
														 | 
														
														 | 
														
															 <script lang="ts" setup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  import { ref } from 'vue'; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  import { useRouter } from 'vue-router'; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const selectedKeys = ref<string[]>(['4']) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const router = useRouter() 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  import { ref, computed, watch, toRef } from 'vue'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  import { useRouter, useRoute, onBeforeRouteUpdate } from 'vue-router'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  import { AppStore } from '@/store/modules/app'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  import type { RouteRecordName, RouteLocationNormalized } from 'vue-router' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const onCollapse = (collapsed: boolean, type: string) => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log(collapsed, type); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  }; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  const onBreakpoint = (broken: boolean) => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    console.log(broken); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  }; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const router = useRouter() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const route = useRoute() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const store = AppStore() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const selectedKeys = ref<string[]>([]) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const menus = computed(() => store.authRoutes) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const matchRouteHandle = (to: RouteLocationNormalized) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    menus.value.forEach(el => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (el.name === to.name) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        console.log(el, to); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        selectedKeys.value = [to.name as string] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    }) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  // onBeforeRouteUpdate(to => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  //   matchRouteHandle(to) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  // }) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  matchRouteHandle(route) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   const toHomeHandle = () => { 
														 | 
														
														 | 
														
															   const toHomeHandle = () => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     router.push('/') 
														 | 
														
														 | 
														
															     router.push('/') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  const toPageHandle = (name: RouteRecordName | undefined) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    router.push({ name }) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 </script> 
														 | 
														
														 | 
														
															 </script> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 <style lang="less" scoped> 
														 | 
														
														 | 
														
															 <style lang="less" scoped> 
														 |