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