config.d.ts 4.2 KB
Newer Older
1
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
2 3 4 5 6 7
import {
  ContentEnum,
  PermissionModeEnum,
  ThemeEnum,
  RouterTransitionEnum,
  SettingButtonPositionEnum,
8
  SessionTimeoutProcessingEnum,
9
} from '/@/enums/appEnum';
V
Vben 已提交
10

V
vben 已提交
11
import { CacheTypeEnum } from '/@/enums/cacheEnum';
V
vben 已提交
12

13 14
export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';

陈文彬 已提交
15
export interface MenuSetting {
V
vben 已提交
16 17
  bgColor: string;
  fixed: boolean;
陈文彬 已提交
18
  collapsed: boolean;
19
  siderHidden: boolean;
V
vben 已提交
20
  canDrag: boolean;
陈文彬 已提交
21
  show: boolean;
V
vben 已提交
22
  hidden: boolean;
陈文彬 已提交
23 24 25 26
  split: boolean;
  menuWidth: number;
  mode: MenuModeEnum;
  type: MenuTypeEnum;
V
vben 已提交
27
  theme: ThemeEnum;
陈文彬 已提交
28
  topMenuAlign: 'start' | 'center' | 'end';
V
vben 已提交
29
  trigger: TriggerEnum;
V
vben 已提交
30
  accordion: boolean;
V
vben 已提交
31
  closeMixSidebarOnChange: boolean;
V
vben 已提交
32
  collapsedShowTitle: boolean;
33
  mixSideTrigger: MixSidebarTriggerEnum;
34
  mixSideFixed: boolean;
陈文彬 已提交
35 36 37
}

export interface MultiTabsSetting {
V
Vben 已提交
38
  cache: boolean;
陈文彬 已提交
39 40
  show: boolean;
  showQuick: boolean;
V
vben 已提交
41
  canDrag: boolean;
V
vben 已提交
42
  showRedo: boolean;
V
vben 已提交
43
  showFold: boolean;
陈文彬 已提交
44 45 46
}

export interface HeaderSetting {
V
vben 已提交
47
  bgColor: string;
陈文彬 已提交
48 49
  fixed: boolean;
  show: boolean;
V
vben 已提交
50
  theme: ThemeEnum;
V
Vben 已提交
51
  // Turn on full screen
陈文彬 已提交
52
  showFullScreen: boolean;
V
Vben 已提交
53
  // Whether to show the lock screen
陈文彬 已提交
54
  useLockPage: boolean;
V
Vben 已提交
55
  // Show document button
陈文彬 已提交
56
  showDoc: boolean;
V
Vben 已提交
57
  // Show message center button
C
chen-xt 已提交
58
  showNotice: boolean;
V
vben 已提交
59
  showSearch: boolean;
陈文彬 已提交
60
}
V
vben 已提交
61 62

export interface LocaleSetting {
63
  showPicker: boolean;
V
vben 已提交
64
  // Current language
65
  locale: LocaleType;
V
vben 已提交
66 67 68 69 70 71
  // default language
  fallback: LocaleType;
  // available Locales
  availableLocales: LocaleType[];
}

V
vben 已提交
72 73 74 75 76 77 78 79 80 81 82
export interface TransitionSetting {
  //  Whether to open the page switching animation
  enable: boolean;
  // Route basic switching animation
  basicTransition: RouterTransitionEnum;
  // Whether to open page switching loading
  openPageLoading: boolean;
  // Whether to open the top progress bar
  openNProgress: boolean;
}

陈文彬 已提交
83
export interface ProjectConfig {
V
Vben 已提交
84
  // Storage location of permission related information
V
vben 已提交
85
  permissionCacheType: CacheTypeEnum;
V
Vben 已提交
86
  // Whether to show the configuration button
陈文彬 已提交
87
  showSettingButton: boolean;
V
Vben 已提交
88 89
  // Whether to show the theme switch button
  showDarkModeToggle: boolean;
V
Vben 已提交
90
  // Configure where the button is displayed
91
  settingButtonPosition: SettingButtonPositionEnum;
V
Vben 已提交
92
  // Permission mode
陈文彬 已提交
93
  permissionMode: PermissionModeEnum;
94 95
  // Session timeout processing
  sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
V
Vben 已提交
96
  // Website gray mode, open for possible mourning dates
陈文彬 已提交
97
  grayMode: boolean;
V
Vben 已提交
98
  // Whether to turn on the color weak mode
陈文彬 已提交
99
  colorWeak: boolean;
V
Vben 已提交
100
  // Theme color
陈文彬 已提交
101
  themeColor: string;
V
Vben 已提交
102 103

  // The main interface is displayed in full screen, the menu is not displayed, and the top
陈文彬 已提交
104
  fullContent: boolean;
V
Vben 已提交
105
  // content width
陈文彬 已提交
106
  contentMode: ContentEnum;
V
Vben 已提交
107
  // Whether to display the logo
陈文彬 已提交
108
  showLogo: boolean;
V
Vben 已提交
109
  // Whether to show the global footer
V
vben 已提交
110
  showFooter: boolean;
陈文彬 已提交
111
  // menuType: MenuTypeEnum;
V
Vben 已提交
112 113
  headerSetting: HeaderSetting;
  // menuSetting
陈文彬 已提交
114
  menuSetting: MenuSetting;
V
Vben 已提交
115
  // Multi-tab settings
陈文彬 已提交
116
  multiTabsSetting: MultiTabsSetting;
V
Vben 已提交
117
  // Animation configuration
V
vben 已提交
118
  transitionSetting: TransitionSetting;
V
Vben 已提交
119
  // pageLayout whether to enable keep-alive
陈文彬 已提交
120
  openKeepAlive: boolean;
V
Vben 已提交
121
  // Lock screen time
陈文彬 已提交
122
  lockTime: number;
V
Vben 已提交
123
  // Show breadcrumbs
陈文彬 已提交
124
  showBreadCrumb: boolean;
V
Vben 已提交
125
  // Show breadcrumb icon
Z
ZhaoBin 已提交
126
  showBreadCrumbIcon: boolean;
V
Vben 已提交
127
  // Use error-handler-plugin
陈文彬 已提交
128
  useErrorHandle: boolean;
V
Vben 已提交
129
  // Whether to open back to top
陈文彬 已提交
130
  useOpenBackTop: boolean;
V
Vben 已提交
131
  // Is it possible to embed iframe pages
陈文彬 已提交
132
  canEmbedIFramePage: boolean;
V
Vben 已提交
133
  // Whether to delete unclosed messages and notify when switching the interface
134
  closeMessageOnSwitch: boolean;
V
Vben 已提交
135
  // Whether to cancel the http request that has been sent but not responded when switching the interface.
136
  removeAllHttpPending: boolean;
陈文彬 已提交
137 138 139
}

export interface GlobConfig {
V
Vben 已提交
140
  // Site title
陈文彬 已提交
141
  title: string;
V
Vben 已提交
142
  // Service interface url
陈文彬 已提交
143
  apiUrl: string;
V
Vben 已提交
144
  // Upload url
V
vben 已提交
145
  uploadUrl?: string;
V
Vben 已提交
146
  //  Service interface url prefix
陈文彬 已提交
147
  urlPrefix?: string;
V
Vben 已提交
148
  // Project abbreviation
陈文彬 已提交
149 150 151
  shortName: string;
}
export interface GlobEnvConfig {
V
Vben 已提交
152
  // Site title
B
bin 已提交
153
  VITE_GLOB_APP_TITLE: string;
V
Vben 已提交
154
  // Service interface url
B
bin 已提交
155
  VITE_GLOB_API_URL: string;
V
Vben 已提交
156
  // Service interface url prefix
B
bin 已提交
157
  VITE_GLOB_API_URL_PREFIX?: string;
V
Vben 已提交
158
  // Upload url
V
vben 已提交
159
  VITE_GLOB_UPLOAD_URL?: string;
陈文彬 已提交
160
}