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,9 +1,3 @@
/** 布局组件的名称 */
export enum EnumLayoutComponentName {
basic = 'basic-layout',
blank = 'blank-layout',
}
/** 登录模块 */
export enum EnumLoginModule {
'pwd-login' = '账密登录',

View File

@ -1 +0,0 @@
export {};

35
src/enum/common.ts Normal file
View File

@ -0,0 +1,35 @@
/** http请求头的content-type类型 */
export enum EnumContentType {
json = 'application/json',
formUrlencoded = 'application/x-www-form-urlencoded',
formData = 'multipart/form-data',
}
/** 缓存的key */
export enum EnumStorageKey {
/** 主题颜色 */
'theme-color' = '__THEME_COLOR__',
/** 用户token */
'token' = '__TOKEN__',
/** 用户刷新token */
'refresh-koken' = '__REFRESH_TOKEN__',
/** 用户信息 */
'user-info' = '__USER_INFO__',
/** 多页签路由信息 */
'tab-routes' = '__TAB_ROUTES__',
}
/** 数据类型 */
export enum EnumDataType {
number = '[object Number]',
string = '[object String]',
boolean = '[object Boolean]',
null = '[object Null]',
undefined = '[object Undefined]',
object = '[object Object]',
array = '[object Array]',
date = '[object Date]',
regexp = '[object RegExp]',
set = '[object Set]',
map = '[object Map]',
}

View File

@ -1,5 +0,0 @@
export * from './typeof';
export * from './storage';
export * from './service';
export * from './system';
export * from './theme';

View File

@ -1,6 +0,0 @@
/** http请求头的content-type类型 */
export enum ContentType {
json = 'application/json',
formUrlencoded = 'application/x-www-form-urlencoded',
formData = 'multipart/form-data',
}

View File

@ -1,12 +0,0 @@
export enum EnumStorageKey {
/** 主题颜色 */
'theme-color' = '__THEME_COLOR__',
/** 用户token */
'token' = '__TOKEN__',
/** 用户刷新token */
'refresh-koken' = '__REFRESH_TOKEN__',
/** 用户信息 */
'user-info' = '__USER_INFO__',
/** 多页签路由信息 */
'tab-routes' = '__TAB_ROUTES__',
}

View File

@ -1,14 +0,0 @@
/** 数据类型 */
export enum EnumDataType {
number = '[object Number]',
string = '[object String]',
boolean = '[object Boolean]',
null = '[object Null]',
undefined = '[object Undefined]',
object = '[object Object]',
array = '[object Array]',
date = '[object Date]',
regexp = '[object RegExp]',
set = '[object Set]',
map = '[object Map]',
}

View File

@ -1 +1,3 @@
export * from './common';
export * from './system';
export * from './business';

View File

@ -1,3 +1,9 @@
/** 布局组件的名称 */
export enum EnumLayoutComponentName {
basic = 'basic-layout',
blank = 'blank-layout',
}
/** 布局模式 */
export enum EnumThemeLayoutMode {
'vertical' = '左侧菜单模式',