mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 12:18:43 +08:00 
			
		
		
		
	fix: 面包屑:1.修复使用动态路由的时候,无法显示的bug
This commit is contained in:
		@@ -37,7 +37,7 @@ export default defineComponent({
 | 
				
			|||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const getBreadcrumb = () => {
 | 
					    const getBreadcrumb = () => {
 | 
				
			||||||
      const currentPath = currentRoute.value.path
 | 
					      const currentPath = currentRoute.value.matched.slice(-1)[0].path
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      levelList.value = filter<AppRouteRecordRaw>(unref(menuRouters), (node: AppRouteRecordRaw) => {
 | 
					      levelList.value = filter<AppRouteRecordRaw>(unref(menuRouters), (node: AppRouteRecordRaw) => {
 | 
				
			||||||
        return node.path === currentPath
 | 
					        return node.path === currentPath
 | 
				
			||||||
@@ -47,7 +47,7 @@ export default defineComponent({
 | 
				
			|||||||
    const renderBreadcrumb = () => {
 | 
					    const renderBreadcrumb = () => {
 | 
				
			||||||
      const breadcrumbList = treeToList<AppRouteRecordRaw[]>(unref(levelList))
 | 
					      const breadcrumbList = treeToList<AppRouteRecordRaw[]>(unref(levelList))
 | 
				
			||||||
      return breadcrumbList.map((v) => {
 | 
					      return breadcrumbList.map((v) => {
 | 
				
			||||||
        const disabled = v.redirect === 'noredirect'
 | 
					        const disabled = !v.redirect || v.redirect === 'noredirect'
 | 
				
			||||||
        const meta = v.meta as RouteMeta
 | 
					        const meta = v.meta as RouteMeta
 | 
				
			||||||
        return (
 | 
					        return (
 | 
				
			||||||
          <ElBreadcrumbItem to={{ path: disabled ? '' : v.path }} key={v.name}>
 | 
					          <ElBreadcrumbItem to={{ path: disabled ? '' : v.path }} key={v.name}>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user