mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: 修复动态路由子集设置rank为0报错
This commit is contained in:
		
							parent
							
								
									8de3e8b37f
								
							
						
					
					
						commit
						dc1caecf1c
					
				@ -112,7 +112,11 @@ router.beforeEach((to: toRouteType, _from, next) => {
 | 
			
		||||
              const route = findRouteByPath(path, routes);
 | 
			
		||||
              const routePartent = getParentPaths(path, routes);
 | 
			
		||||
              // 未开启标签页缓存,刷新页面重定向到顶级路由(参考标签页操作例子,只针对动态路由)
 | 
			
		||||
              if (path !== routes[0].path && routePartent.length === 0) {
 | 
			
		||||
              if (
 | 
			
		||||
                path !== routes[0].path &&
 | 
			
		||||
                route?.meta?.rank !== 0 &&
 | 
			
		||||
                routePartent.length === 0
 | 
			
		||||
              ) {
 | 
			
		||||
                const { name, meta } = findRouteByPath(
 | 
			
		||||
                  route?.meta?.refreshRedirect,
 | 
			
		||||
                  routes
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user