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