feat(projects): 重构项目的TS类型架构,去除interface文件夹

This commit is contained in:
Soybean
2022-03-12 17:45:37 +08:00
parent 75de2b0604
commit 8191490f39
58 changed files with 400 additions and 461 deletions

View File

@ -2,15 +2,14 @@ import type { Component } from 'vue';
import { EnumLayoutComponentName } from '@/enum';
import { BasicLayout, BlankLayout } from '@/layouts';
import { views } from '@/views';
import type { LayoutComponentName } from '@/interface';
type LayoutComponent = Record<LayoutComponentName, () => Promise<Component>>;
type LayoutComponent = Record<EnumType.LayoutComponentName, () => Promise<Component>>;
/**
* 获取页面导入的vue文件(懒加载的方式)
* @param layoutType - 布局类型
*/
export function getLayoutComponent(layoutType: LayoutComponentName) {
export function getLayoutComponent(layoutType: EnumType.LayoutComponentName) {
const layoutComponent: LayoutComponent = {
basic: BasicLayout,
blank: BlankLayout,