refactor(projects): rename union key

This commit is contained in:
Soybean 2023-03-08 06:40:40 +08:00
parent 21d5214247
commit e2b320ad27
2 changed files with 9 additions and 9 deletions

View File

@ -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';
}

View File

@ -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