mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 重构项目的TS类型架构,去除interface文件夹
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import type { GlobalMenuOption, GlobalBreadcrumb } from '@/interface';
|
||||
|
||||
/**
|
||||
* 获取面包屑数据
|
||||
* @param activeKey - 当前页面路由的key
|
||||
|
@ -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,
|
||||
|
@ -1,4 +1,3 @@
|
||||
import type { GlobalMenuOption } from '@/interface';
|
||||
import { iconifyRender } from '../common';
|
||||
|
||||
/** 路由不转换菜单 */
|
||||
|
@ -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('|');
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { EnumStorageKey } from '@/enum';
|
||||
import type { GlobalTabRoute } from '@/interface';
|
||||
import { setLocal, getLocal } from '../storage';
|
||||
|
||||
/** 缓存多页签数据 */
|
||||
|
Reference in New Issue
Block a user