clddup
2024-07-19 baf406e7e271ac90faa3aec31ceb44715331d9d0
提交 | 用户 | age
4d2fb0 1 import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '@/enums/menuEnum';
da0491 2 import {
V 3   ContentEnum,
4   PermissionModeEnum,
5   ThemeEnum,
6   RouterTransitionEnum,
7   SettingButtonPositionEnum,
0d0708 8   SessionTimeoutProcessingEnum,
4d2fb0 9 } from '@/enums/appEnum';
8a9ca4 10
4d2fb0 11 import { CacheTypeEnum } from '@/enums/cacheEnum';
f6cef1 12
V 13 export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
737b1b 14
2f6253 15 export interface MenuSetting {
0692b4 16   bgColor: string;
V 17   fixed: boolean;
2f6253 18   collapsed: boolean;
554f46 19   siderHidden: boolean;
cedba3 20   canDrag: boolean;
2f6253 21   show: boolean;
4f6b65 22   hidden: boolean;
2f6253 23   split: boolean;
24   menuWidth: number;
25   mode: MenuModeEnum;
26   type: MenuTypeEnum;
46e087 27   theme: ThemeEnum;
2f6253 28   topMenuAlign: 'start' | 'center' | 'end';
4f6b65 29   trigger: TriggerEnum;
4ff6b7 30   accordion: boolean;
e6db0d 31   closeMixSidebarOnChange: boolean;
f69aae 32   collapsedShowTitle: boolean;
e821f4 33   mixSideTrigger: MixSidebarTriggerEnum;
97180e 34   mixSideFixed: boolean;
2f6253 35 }
36
37 export interface MultiTabsSetting {
967b28 38   cache: boolean;
2f6253 39   show: boolean;
40   showQuick: boolean;
cedba3 41   canDrag: boolean;
a65ad9 42   showRedo: boolean;
0e7c57 43   showFold: boolean;
191e80 44   autoCollapse: boolean;
2f6253 45 }
46
47 export interface HeaderSetting {
0692b4 48   bgColor: string;
2f6253 49   fixed: boolean;
50   show: boolean;
46e087 51   theme: ThemeEnum;
8a9ca4 52   // Turn on full screen
2f6253 53   showFullScreen: boolean;
8a9ca4 54   // Whether to show the lock screen
2f6253 55   useLockPage: boolean;
8a9ca4 56   // Show document button
2f6253 57   showDoc: boolean;
8a9ca4 58   // Show message center button
7a1e94 59   showNotice: boolean;
dddda5 60   showSearch: boolean;
00bf5d 61   showApi: boolean;
2f6253 62 }
737b1b 63
V 64 export interface LocaleSetting {
f6cef1 65   showPicker: boolean;
737b1b 66   // Current language
f6cef1 67   locale: LocaleType;
737b1b 68   // default language
V 69   fallback: LocaleType;
70   // available Locales
71   availableLocales: LocaleType[];
72 }
73
41d790 74 export interface TransitionSetting {
V 75   //  Whether to open the page switching animation
76   enable: boolean;
77   // Route basic switching animation
78   basicTransition: RouterTransitionEnum;
79   // Whether to open page switching loading
80   openPageLoading: boolean;
81   // Whether to open the top progress bar
82   openNProgress: boolean;
83 }
84
2f6253 85 export interface ProjectConfig {
8a9ca4 86   // Storage location of permission related information
26b610 87   permissionCacheType: CacheTypeEnum;
8a9ca4 88   // Whether to show the configuration button
2f6253 89   showSettingButton: boolean;
5b8eb4 90   // Whether to show the theme switch button
V 91   showDarkModeToggle: boolean;
8a9ca4 92   // Configure where the button is displayed
da0491 93   settingButtonPosition: SettingButtonPositionEnum;
8a9ca4 94   // Permission mode
2f6253 95   permissionMode: PermissionModeEnum;
0d0708 96   // Session timeout processing
V 97   sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
8a9ca4 98   // Website gray mode, open for possible mourning dates
2f6253 99   grayMode: boolean;
8a9ca4 100   // Whether to turn on the color weak mode
2f6253 101   colorWeak: boolean;
8a9ca4 102   // Theme color
2f6253 103   themeColor: string;
8a9ca4 104
V 105   // The main interface is displayed in full screen, the menu is not displayed, and the top
2f6253 106   fullContent: boolean;
8a9ca4 107   // content width
2f6253 108   contentMode: ContentEnum;
8a9ca4 109   // Whether to display the logo
2f6253 110   showLogo: boolean;
8a9ca4 111   // Whether to show the global footer
0692b4 112   showFooter: boolean;
2f6253 113   // menuType: MenuTypeEnum;
8a9ca4 114   headerSetting: HeaderSetting;
V 115   // menuSetting
2f6253 116   menuSetting: MenuSetting;
8a9ca4 117   // Multi-tab settings
2f6253 118   multiTabsSetting: MultiTabsSetting;
8a9ca4 119   // Animation configuration
41d790 120   transitionSetting: TransitionSetting;
8a9ca4 121   // pageLayout whether to enable keep-alive
2f6253 122   openKeepAlive: boolean;
8a9ca4 123   // Lock screen time
2f6253 124   lockTime: number;
8a9ca4 125   // Show breadcrumbs
2f6253 126   showBreadCrumb: boolean;
8a9ca4 127   // Show breadcrumb icon
d8b25b 128   showBreadCrumbIcon: boolean;
8a9ca4 129   // Use error-handler-plugin
2f6253 130   useErrorHandle: boolean;
8a9ca4 131   // Whether to open back to top
2f6253 132   useOpenBackTop: boolean;
8a9ca4 133   // Is it possible to embed iframe pages
2f6253 134   canEmbedIFramePage: boolean;
8a9ca4 135   // Whether to delete unclosed messages and notify when switching the interface
e83cb0 136   closeMessageOnSwitch: boolean;
8a9ca4 137   // Whether to cancel the http request that has been sent but not responded when switching the interface.
e83cb0 138   removeAllHttpPending: boolean;
2f6253 139 }
140
141 export interface GlobConfig {
8a9ca4 142   // Site title
2f6253 143   title: string;
8a9ca4 144   // Service interface url
2f6253 145   apiUrl: string;
8a9ca4 146   // Upload url
29461a 147   uploadUrl?: string;
8a9ca4 148   //  Service interface url prefix
2f6253 149   urlPrefix?: string;
8a9ca4 150   // Project abbreviation
2f6253 151   shortName: string;
152 }
153 export interface GlobEnvConfig {
8a9ca4 154   // Site title
e8aede 155   VITE_GLOB_APP_TITLE: string;
8a9ca4 156   // Service interface url
e8aede 157   VITE_GLOB_API_URL: string;
8a9ca4 158   // Service interface url prefix
e8aede 159   VITE_GLOB_API_URL_PREFIX?: string;
8a9ca4 160   // Upload url
29461a 161   VITE_GLOB_UPLOAD_URL?: string;
2f6253 162 }