mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	refactor(projects): rename union key
This commit is contained in:
		
							
								
								
									
										14
									
								
								src/typings/union-key.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								src/typings/union-key.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -2,6 +2,13 @@ declare namespace UnionKey {
 | 
			
		||||
  /** http请求头的content-type类型 */
 | 
			
		||||
  type ContentType = 'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data';
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 布局组件的名称
 | 
			
		||||
   * - basic 基础布局
 | 
			
		||||
   * - blank 空白布局
 | 
			
		||||
   */
 | 
			
		||||
  type LayoutComponentType = 'basic' | 'blank';
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 登录模块
 | 
			
		||||
   * - pwd-login: 账密登录
 | 
			
		||||
@@ -46,11 +53,4 @@ declare namespace UnionKey {
 | 
			
		||||
   * - fade-scale: 缩放消退
 | 
			
		||||
   */
 | 
			
		||||
  type ThemeAnimateMode = 'zoom-fade' | 'zoom-out' | 'fade-slide' | 'fade' | 'fade-bottom' | 'fade-scale';
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 布局组件的名称
 | 
			
		||||
   * - basic 基础布局
 | 
			
		||||
   * - blank 空白布局
 | 
			
		||||
   */
 | 
			
		||||
  type LayoutComponentName = 'basic' | 'blank';
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -9,13 +9,13 @@ interface ModuleComponent {
 | 
			
		||||
  default: RouteComponent;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type LayoutComponent = Record<UnionKey.LayoutComponentName, Lazy<ModuleComponent>>;
 | 
			
		||||
type LayoutComponent = Record<UnionKey.LayoutComponentType, Lazy<ModuleComponent>>;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 获取布局的vue文件(懒加载的方式)
 | 
			
		||||
 * @param layoutType - 布局类型
 | 
			
		||||
 */
 | 
			
		||||
export function getLayoutComponent(layoutType: UnionKey.LayoutComponentName) {
 | 
			
		||||
export function getLayoutComponent(layoutType: UnionKey.LayoutComponentType) {
 | 
			
		||||
  const layoutComponent: LayoutComponent = {
 | 
			
		||||
    basic: BasicLayout,
 | 
			
		||||
    blank: BlankLayout
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user