mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): remove enum
This commit is contained in:
@ -9,13 +9,13 @@ interface ModuleComponent {
|
||||
default: RouteComponent;
|
||||
}
|
||||
|
||||
type LayoutComponent = Record<EnumType.LayoutComponentName, Lazy<ModuleComponent>>;
|
||||
type LayoutComponent = Record<UnionKey.LayoutComponentName, Lazy<ModuleComponent>>;
|
||||
|
||||
/**
|
||||
* 获取布局的vue文件(懒加载的方式)
|
||||
* @param layoutType - 布局类型
|
||||
*/
|
||||
export function getLayoutComponent(layoutType: EnumType.LayoutComponentName) {
|
||||
export function getLayoutComponent(layoutType: UnionKey.LayoutComponentName) {
|
||||
const layoutComponent: LayoutComponent = {
|
||||
basic: BasicLayout,
|
||||
blank: BlankLayout
|
||||
|
@ -1,5 +1,5 @@
|
||||
/** 获取登录页面模块的动态路由的正则 */
|
||||
export function getLoginModuleRegExp() {
|
||||
const modules: EnumType.LoginModuleKey[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
|
||||
const modules: UnionKey.LoginModule[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat'];
|
||||
return modules.join('|');
|
||||
}
|
||||
|
Reference in New Issue
Block a user