mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	Merge pull request #180 from sunhao1256/main
fix(projects): not only `/login` claim dynamic path scenario
This commit is contained in:
		
							
								
								
									
										6
									
								
								src/typings/route.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								src/typings/route.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -28,11 +28,11 @@ declare namespace AuthRoute {
 | 
			
		||||
  type RouteComponentType = 'basic' | 'blank' | 'multi' | 'self';
 | 
			
		||||
 | 
			
		||||
  /** 路由描述 */
 | 
			
		||||
  interface RouteMeta {
 | 
			
		||||
  interface RouteMeta<K extends AuthRoute.RoutePath> {
 | 
			
		||||
    /** 路由标题(可用来作document.title或者菜单的名称) */
 | 
			
		||||
    title: string;
 | 
			
		||||
    /** 路由的动态路径(需要动态路径的页面需要将path添加进范型参数) */
 | 
			
		||||
    dynamicPath?: AuthRouteUtils.GetDynamicPath<'/login'>;
 | 
			
		||||
    dynamicPath?: AuthRouteUtils.GetDynamicPath<K>;
 | 
			
		||||
    /** 作为单级路由的父级路由布局组件 */
 | 
			
		||||
    singleLayout?: Extract<RouteComponentType, 'basic' | 'blank'>;
 | 
			
		||||
    /** 需要登录权限 */
 | 
			
		||||
@@ -83,7 +83,7 @@ declare namespace AuthRoute {
 | 
			
		||||
        /** 子路由 */
 | 
			
		||||
        children?: Route[];
 | 
			
		||||
        /** 路由描述 */
 | 
			
		||||
        meta: RouteMeta;
 | 
			
		||||
        meta: RouteMeta<RoutePath<K>>;
 | 
			
		||||
      } & Omit<import('vue-router').RouteRecordRaw, 'name' | 'path' | 'redirect' | 'component' | 'children' | 'meta'>
 | 
			
		||||
    : never;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								src/typings/router.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								src/typings/router.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
import 'vue-router';
 | 
			
		||||
 | 
			
		||||
declare module 'vue-router' {
 | 
			
		||||
  interface RouteMeta extends AuthRoute.RouteMeta {}
 | 
			
		||||
  interface RouteMeta extends AuthRoute.RouteMeta<AuthRoute.RoutePath> {}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user