Blame view

types/config.d.ts 4.13 KB
1
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
2
3
4
5
6
7
8
import {
  ContentEnum,
  PermissionModeEnum,
  ThemeEnum,
  RouterTransitionEnum,
  SettingButtonPositionEnum,
} from '/@/enums/appEnum';
Vben authored
9
10
import { CacheTypeEnum } from '/@/enums/cacheEnum';
11
import { ThemeMode } from '../build/config/themeConfig';
vben authored
12
13
14
export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
陈文彬 authored
15
export interface MenuSetting {
vben authored
16
17
  bgColor: string;
  fixed: boolean;
陈文彬 authored
18
  collapsed: boolean;
19
  canDrag: boolean;
陈文彬 authored
20
  show: boolean;
21
  hidden: boolean;
陈文彬 authored
22
23
24
25
  split: boolean;
  menuWidth: number;
  mode: MenuModeEnum;
  type: MenuTypeEnum;
vben authored
26
  theme: ThemeEnum;
陈文彬 authored
27
  topMenuAlign: 'start' | 'center' | 'end';
28
  trigger: TriggerEnum;
29
  accordion: boolean;
30
  closeMixSidebarOnChange: boolean;
vben authored
31
  collapsedShowTitle: boolean;
32
  mixSideTrigger: MixSidebarTriggerEnum;
33
  mixSideFixed: boolean;
陈文彬 authored
34
35
36
37
38
}

export interface MultiTabsSetting {
  show: boolean;
  showQuick: boolean;
39
  canDrag: boolean;
vben authored
40
  showRedo: boolean;
vben authored
41
  showFold: boolean;
陈文彬 authored
42
43
44
}

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

export interface LocaleSetting {
61
  showPicker: boolean;
vben authored
62
  // Current language
63
  locale: LocaleType;
vben authored
64
65
66
67
68
69
  // default language
  fallback: LocaleType;
  // available Locales
  availableLocales: LocaleType[];
}
vben authored
70
71
72
73
74
75
76
77
78
79
80
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;
}
陈文彬 authored
81
export interface ProjectConfig {
Vben authored
82
  // Storage location of permission related information
83
  permissionCacheType: CacheTypeEnum;
Vben authored
84
  // Whether to show the configuration button
陈文彬 authored
85
  showSettingButton: boolean;
Vben authored
86
  // Configure where the button is displayed
87
  settingButtonPosition: SettingButtonPositionEnum;
Vben authored
88
  // Permission mode
陈文彬 authored
89
  permissionMode: PermissionModeEnum;
Vben authored
90
  // Website gray mode, open for possible mourning dates
陈文彬 authored
91
  grayMode: boolean;
Vben authored
92
  // Whether to turn on the color weak mode
陈文彬 authored
93
  colorWeak: boolean;
Vben authored
94
  // Theme color
陈文彬 authored
95
  themeColor: string;
Vben authored
96
vben authored
97
  themeMode: ThemeMode;
Vben authored
98
  // The main interface is displayed in full screen, the menu is not displayed, and the top
陈文彬 authored
99
  fullContent: boolean;
Vben authored
100
  // content width
陈文彬 authored
101
  contentMode: ContentEnum;
Vben authored
102
  // Whether to display the logo
陈文彬 authored
103
  showLogo: boolean;
Vben authored
104
  // Whether to show the global footer
vben authored
105
  showFooter: boolean;
陈文彬 authored
106
  // menuType: MenuTypeEnum;
Vben authored
107
108
  headerSetting: HeaderSetting;
  // menuSetting
陈文彬 authored
109
  menuSetting: MenuSetting;
Vben authored
110
  // Multi-tab settings
陈文彬 authored
111
  multiTabsSetting: MultiTabsSetting;
Vben authored
112
  // Animation configuration
vben authored
113
  transitionSetting: TransitionSetting;
Vben authored
114
  // pageLayout whether to enable keep-alive
陈文彬 authored
115
  openKeepAlive: boolean;
Vben authored
116
  // Lock screen time
陈文彬 authored
117
  lockTime: number;
Vben authored
118
  // Show breadcrumbs
陈文彬 authored
119
  showBreadCrumb: boolean;
Vben authored
120
  // Show breadcrumb icon
121
  showBreadCrumbIcon: boolean;
Vben authored
122
  // Use error-handler-plugin
陈文彬 authored
123
  useErrorHandle: boolean;
Vben authored
124
  // Whether to open back to top
陈文彬 authored
125
  useOpenBackTop: boolean;
Vben authored
126
  // Is it possible to embed iframe pages
陈文彬 authored
127
  canEmbedIFramePage: boolean;
Vben authored
128
  // Whether to delete unclosed messages and notify when switching the interface
129
  closeMessageOnSwitch: boolean;
Vben authored
130
  // Whether to cancel the http request that has been sent but not responded when switching the interface.
131
  removeAllHttpPending: boolean;
陈文彬 authored
132
133
134
}

export interface GlobConfig {
Vben authored
135
  // Site title
陈文彬 authored
136
  title: string;
Vben authored
137
  // Service interface url
陈文彬 authored
138
  apiUrl: string;
Vben authored
139
  // Upload url
vben authored
140
  uploadUrl?: string;
Vben authored
141
  //  Service interface url prefix
陈文彬 authored
142
  urlPrefix?: string;
Vben authored
143
  // Project abbreviation
陈文彬 authored
144
145
146
  shortName: string;
}
export interface GlobEnvConfig {
Vben authored
147
  // Site title
148
  VITE_GLOB_APP_TITLE: string;
Vben authored
149
  // Service interface url
150
  VITE_GLOB_API_URL: string;
Vben authored
151
  // Service interface url prefix
152
  VITE_GLOB_API_URL_PREFIX?: string;
Vben authored
153
  // Project abbreviation
154
  VITE_GLOB_APP_SHORT_NAME: string;
Vben authored
155
  // Upload url
vben authored
156
  VITE_GLOB_UPLOAD_URL?: string;
陈文彬 authored
157
}