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

@ -1,5 +1,3 @@
import type { GlobalMenuOption, GlobalBreadcrumb } from '@/interface';
/**
* 获取面包屑数据
* @param activeKey - 当前页面路由的key

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,

View File

@ -1,4 +1,3 @@
import type { GlobalMenuOption } from '@/interface';
import { iconifyRender } from '../common';
/** 路由不转换菜单 */

View File

@ -1,7 +1,5 @@
import type { LoginModuleKey } from '@/interface';
/** 获取登录页面模块的动态路由的正则 */
export function getLoginModuleRegExp() {
const modules: LoginModuleKey[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
const modules: EnumType.LoginModuleKey[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
return modules.join('|');
}

View File

@ -1,5 +1,4 @@
import { EnumStorageKey } from '@/enum';
import type { GlobalTabRoute } from '@/interface';
import { setLocal, getLocal } from '../storage';
/** 缓存多页签数据 */