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