Vben
2021-02-26 a821d9a3a279f0e6a5b7dbb316725d603ce30f74
提交 | 用户 | 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';
8882d4 11 import type { LocaleType } from '/@/locales/types';
8a9ca4 12 import { ThemeMode } from '../../build/config/themeConfig';
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 {
36   show: boolean;
37   showQuick: boolean;
cedba3 38   canDrag: boolean;
a65ad9 39   showRedo: boolean;
0e7c57 40   showFold: boolean;
2f6253 41 }
42
43 export interface HeaderSetting {
0692b4 44   bgColor: string;
2f6253 45   fixed: boolean;
46   show: boolean;
46e087 47   theme: ThemeEnum;
8a9ca4 48   // Turn on full screen
2f6253 49   showFullScreen: boolean;
8a9ca4 50   // Whether to show the lock screen
2f6253 51   useLockPage: boolean;
8a9ca4 52   // Show document button
2f6253 53   showDoc: boolean;
8a9ca4 54   // Show message center button
7a1e94 55   showNotice: boolean;
dddda5 56   showSearch: boolean;
2f6253 57 }
737b1b 58
V 59 export interface LocaleSetting {
e5f8ce 60   show: boolean;
737b1b 61   // Current language
V 62   lang: LocaleType;
63   // default language
64   fallback: LocaleType;
65   // available Locales
66   availableLocales: LocaleType[];
67 }
68
41d790 69 export interface TransitionSetting {
V 70   //  Whether to open the page switching animation
71   enable: boolean;
72   // Route basic switching animation
73   basicTransition: RouterTransitionEnum;
74   // Whether to open page switching loading
75   openPageLoading: boolean;
76   // Whether to open the top progress bar
77   openNProgress: boolean;
78 }
79
2f6253 80 export interface ProjectConfig {
8a9ca4 81   // Multilingual configuration
737b1b 82   locale: LocaleSetting;
8a9ca4 83   // Storage location of permission related information
26b610 84   permissionCacheType: CacheTypeEnum;
8a9ca4 85   // Whether to show the configuration button
2f6253 86   showSettingButton: boolean;
8a9ca4 87   // Configure where the button is displayed
da0491 88   settingButtonPosition: SettingButtonPositionEnum;
8a9ca4 89   // Permission mode
2f6253 90   permissionMode: PermissionModeEnum;
8a9ca4 91   // Website gray mode, open for possible mourning dates
2f6253 92   grayMode: boolean;
8a9ca4 93   // Whether to turn on the color weak mode
2f6253 94   colorWeak: boolean;
8a9ca4 95   // Theme color
2f6253 96   themeColor: string;
8a9ca4 97
3d1681 98   themeMode: ThemeMode;
8a9ca4 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 }