zhang
2023-10-26 4755017bcc2dc0aee2f98b46d929a060a5b1bb62
提交 | 用户 | age
e821f4 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,
da0491 9 } from '/@/enums/appEnum';
8a9ca4 10
26b610 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;
2f6253 44 }
45
46 export interface HeaderSetting {
0692b4 47   bgColor: string;
2f6253 48   fixed: boolean;
49   show: boolean;
46e087 50   theme: ThemeEnum;
8a9ca4 51   // Turn on full screen
2f6253 52   showFullScreen: boolean;
8a9ca4 53   // Whether to show the lock screen
2f6253 54   useLockPage: boolean;
8a9ca4 55   // Show document button
2f6253 56   showDoc: boolean;
8a9ca4 57   // Show message center button
7a1e94 58   showNotice: boolean;
dddda5 59   showSearch: boolean;
00bf5d 60   showApi: boolean;
2f6253 61 }
737b1b 62
V 63 export interface LocaleSetting {
f6cef1 64   showPicker: boolean;
737b1b 65   // Current language
f6cef1 66   locale: LocaleType;
737b1b 67   // default language
V 68   fallback: LocaleType;
69   // available Locales
70   availableLocales: LocaleType[];
71 }
72
41d790 73 export interface TransitionSetting {
V 74   //  Whether to open the page switching animation
75   enable: boolean;
76   // Route basic switching animation
77   basicTransition: RouterTransitionEnum;
78   // Whether to open page switching loading
79   openPageLoading: boolean;
80   // Whether to open the top progress bar
81   openNProgress: boolean;
82 }
83
2f6253 84 export interface ProjectConfig {
8a9ca4 85   // Storage location of permission related information
26b610 86   permissionCacheType: CacheTypeEnum;
8a9ca4 87   // Whether to show the configuration button
2f6253 88   showSettingButton: boolean;
5b8eb4 89   // Whether to show the theme switch button
V 90   showDarkModeToggle: boolean;
8a9ca4 91   // Configure where the button is displayed
da0491 92   settingButtonPosition: SettingButtonPositionEnum;
8a9ca4 93   // Permission mode
2f6253 94   permissionMode: PermissionModeEnum;
0d0708 95   // Session timeout processing
V 96   sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
8a9ca4 97   // Website gray mode, open for possible mourning dates
2f6253 98   grayMode: boolean;
8a9ca4 99   // Whether to turn on the color weak mode
2f6253 100   colorWeak: boolean;
8a9ca4 101   // Theme color
2f6253 102   themeColor: string;
8a9ca4 103
V 104   // The main interface is displayed in full screen, the menu is not displayed, and the top
2f6253 105   fullContent: boolean;
8a9ca4 106   // content width
2f6253 107   contentMode: ContentEnum;
8a9ca4 108   // Whether to display the logo
2f6253 109   showLogo: boolean;
8a9ca4 110   // Whether to show the global footer
0692b4 111   showFooter: boolean;
2f6253 112   // menuType: MenuTypeEnum;
8a9ca4 113   headerSetting: HeaderSetting;
V 114   // menuSetting
2f6253 115   menuSetting: MenuSetting;
8a9ca4 116   // Multi-tab settings
2f6253 117   multiTabsSetting: MultiTabsSetting;
8a9ca4 118   // Animation configuration
41d790 119   transitionSetting: TransitionSetting;
8a9ca4 120   // pageLayout whether to enable keep-alive
2f6253 121   openKeepAlive: boolean;
8a9ca4 122   // Lock screen time
2f6253 123   lockTime: number;
8a9ca4 124   // Show breadcrumbs
2f6253 125   showBreadCrumb: boolean;
8a9ca4 126   // Show breadcrumb icon
d8b25b 127   showBreadCrumbIcon: boolean;
8a9ca4 128   // Use error-handler-plugin
2f6253 129   useErrorHandle: boolean;
8a9ca4 130   // Whether to open back to top
2f6253 131   useOpenBackTop: boolean;
8a9ca4 132   // Is it possible to embed iframe pages
2f6253 133   canEmbedIFramePage: boolean;
8a9ca4 134   // Whether to delete unclosed messages and notify when switching the interface
e83cb0 135   closeMessageOnSwitch: boolean;
8a9ca4 136   // Whether to cancel the http request that has been sent but not responded when switching the interface.
e83cb0 137   removeAllHttpPending: boolean;
2f6253 138 }
139
140 export interface GlobConfig {
8a9ca4 141   // Site title
2f6253 142   title: string;
8a9ca4 143   // Service interface url
2f6253 144   apiUrl: string;
8a9ca4 145   // Upload url
29461a 146   uploadUrl?: string;
8a9ca4 147   //  Service interface url prefix
2f6253 148   urlPrefix?: string;
8a9ca4 149   // Project abbreviation
2f6253 150   shortName: string;
151 }
152 export interface GlobEnvConfig {
8a9ca4 153   // Site title
e8aede 154   VITE_GLOB_APP_TITLE: string;
8a9ca4 155   // Service interface url
e8aede 156   VITE_GLOB_API_URL: string;
8a9ca4 157   // Service interface url prefix
e8aede 158   VITE_GLOB_API_URL_PREFIX?: string;
8a9ca4 159   // Upload url
29461a 160   VITE_GLOB_UPLOAD_URL?: string;
2f6253 161 }