提交 | 用户 | age
|
2f6253
|
1 |
import type { ProjectConfig } from '/@/types/config'; |
陈 |
2 |
|
46e087
|
3 |
import { MenuTypeEnum, MenuModeEnum, TriggerEnum } from '/@/enums/menuEnum'; |
26b610
|
4 |
import { CacheTypeEnum } from '/@/enums/cacheEnum'; |
46e087
|
5 |
import { ContentEnum, PermissionModeEnum, ThemeEnum, RouterTransitionEnum } from '/@/enums/appEnum'; |
173d40
|
6 |
import { primaryColor } from '../../build/config/lessModifyVars'; |
9b61e8
|
7 |
import { isProdMode } from '/@/utils/env'; |
dc42d4
|
8 |
|
21a225
|
9 |
// ! You need to clear the browser cache after the change |
2f6253
|
10 |
const setting: ProjectConfig = { |
41d790
|
11 |
// Whether to show the configuration button |
V |
12 |
showSettingButton: true, |
|
13 |
|
|
14 |
// Permission mode |
|
15 |
permissionMode: PermissionModeEnum.ROLE, |
26b610
|
16 |
|
V |
17 |
// Permission-related cache is stored in sessionStorage or localStorage |
|
18 |
permissionCacheType: CacheTypeEnum.LOCAL, |
41d790
|
19 |
|
V |
20 |
// color |
|
21 |
// TODO Theme color |
|
22 |
themeColor: primaryColor, |
|
23 |
|
|
24 |
// Website gray mode, open for possible mourning dates |
|
25 |
grayMode: false, |
|
26 |
|
|
27 |
// Color Weakness Mode |
|
28 |
colorWeak: false, |
|
29 |
|
|
30 |
// Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems |
|
31 |
fullContent: false, |
|
32 |
|
|
33 |
// content mode |
|
34 |
contentMode: ContentEnum.FULL, |
|
35 |
|
|
36 |
// Whether to display the logo |
|
37 |
showLogo: true, |
|
38 |
|
|
39 |
// Whether to show footer |
ebf7c8
|
40 |
showFooter: false, |
41d790
|
41 |
|
737b1b
|
42 |
// locale setting |
V |
43 |
locale: { |
e5f8ce
|
44 |
show: true, |
ba068b
|
45 |
// Locale |
737b1b
|
46 |
lang: 'zh_CN', |
V |
47 |
// Default locale |
|
48 |
fallback: 'zh_CN', |
|
49 |
// available Locales |
|
50 |
availableLocales: ['zh_CN', 'en'], |
|
51 |
}, |
|
52 |
|
41d790
|
53 |
// Header configuration |
2f6253
|
54 |
headerSetting: { |
0692b4
|
55 |
// header bg color |
V |
56 |
bgColor: '#ffffff', |
41d790
|
57 |
// Fixed at the top |
2f6253
|
58 |
fixed: true, |
41d790
|
59 |
// Whether to show top |
2f6253
|
60 |
show: true, |
陈 |
61 |
// theme |
46e087
|
62 |
theme: ThemeEnum.LIGHT, |
41d790
|
63 |
// Whether to enable the lock screen function |
710158
|
64 |
useLockPage: true, |
a65ad9
|
65 |
|
41d790
|
66 |
// Whether to show the full screen button |
2f6253
|
67 |
showFullScreen: true, |
41d790
|
68 |
// Whether to show the document button |
2f6253
|
69 |
showDoc: true, |
41d790
|
70 |
// Whether to show the notification button |
7a1e94
|
71 |
showNotice: true, |
dddda5
|
72 |
// Whether to display the menu search |
V |
73 |
showSearch: true, |
2f6253
|
74 |
}, |
ba068b
|
75 |
|
41d790
|
76 |
// Menu configuration |
2f6253
|
77 |
menuSetting: { |
0692b4
|
78 |
// sidebar menu bg color |
V |
79 |
bgColor: '#273352', |
41d790
|
80 |
// Whether to fix the left menu |
0692b4
|
81 |
fixed: true, |
41d790
|
82 |
// Menu collapse |
2f6253
|
83 |
collapsed: false, |
f69aae
|
84 |
// Whether to display the menu name when folding the menu |
V |
85 |
collapsedShowTitle: false, |
41d790
|
86 |
// Whether it can be dragged |
V |
87 |
// Only limited to the opening of the left menu, the mouse has a drag bar on the right side of the menu |
e6db0d
|
88 |
canDrag: true, |
41d790
|
89 |
// Whether to show no dom |
2f6253
|
90 |
show: true, |
41d790
|
91 |
// Whether to show dom |
c774a6
|
92 |
hidden: false, |
41d790
|
93 |
// Menu width |
2b95be
|
94 |
menuWidth: 210, |
41d790
|
95 |
// Menu mode |
2f6253
|
96 |
mode: MenuModeEnum.INLINE, |
41d790
|
97 |
// Menu type |
2f6253
|
98 |
type: MenuTypeEnum.SIDEBAR, |
41d790
|
99 |
// Menu theme |
46e087
|
100 |
theme: ThemeEnum.DARK, |
41d790
|
101 |
// Split menu |
2f6253
|
102 |
split: false, |
41d790
|
103 |
// Top menu layout |
770283
|
104 |
topMenuAlign: 'center', |
41d790
|
105 |
// Fold trigger position |
4f6b65
|
106 |
trigger: TriggerEnum.HEADER, |
41d790
|
107 |
// Turn on accordion mode, only show a menu |
4ff6b7
|
108 |
accordion: true, |
e6db0d
|
109 |
// Switch page to close menu |
V |
110 |
closeMixSidebarOnChange: false, |
0419a0
|
111 |
// Module opening method ‘click’ |'hover' |
V |
112 |
mixSideTrigger: 'hover', |
2f6253
|
113 |
}, |
737b1b
|
114 |
|
41d790
|
115 |
// Multi-label |
2f6253
|
116 |
multiTabsSetting: { |
41d790
|
117 |
// Turn on |
2f6253
|
118 |
show: true, |
cedba3
|
119 |
// Is it possible to drag and drop sorting tabs |
V |
120 |
canDrag: true, |
41d790
|
121 |
// Turn on quick actions |
2f6253
|
122 |
showQuick: true, |
a65ad9
|
123 |
|
V |
124 |
// Whether to show the refresh button |
|
125 |
showRedo: true, |
2f6253
|
126 |
}, |
ba068b
|
127 |
|
41d790
|
128 |
// Transition Setting |
V |
129 |
transitionSetting: { |
|
130 |
// Whether to open the page switching animation |
|
131 |
// The disabled state will also disable pageLoadinng |
|
132 |
enable: true, |
|
133 |
|
|
134 |
// Route basic switching animation |
|
135 |
basicTransition: RouterTransitionEnum.FADE_SIDE, |
|
136 |
|
|
137 |
// Whether to open page switching loading |
|
138 |
// Only open when enable=true |
|
139 |
openPageLoading: true, |
|
140 |
|
|
141 |
// Whether to open the top progress bar |
26b610
|
142 |
openNProgress: false, |
41d790
|
143 |
}, |
V |
144 |
|
|
145 |
// Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time |
2f6253
|
146 |
openKeepAlive: true, |
陈 |
147 |
|
41d790
|
148 |
// Automatic screen lock time, 0 does not lock the screen. Unit minute default 0 |
2f6253
|
149 |
lockTime: 0, |
ba068b
|
150 |
|
41d790
|
151 |
// Whether to show breadcrumbs |
2f6253
|
152 |
showBreadCrumb: true, |
ba068b
|
153 |
|
41d790
|
154 |
// Whether to show the breadcrumb icon |
d8b25b
|
155 |
showBreadCrumbIcon: false, |
2f6253
|
156 |
|
41d790
|
157 |
// Use error-handler-plugin |
1fb759
|
158 |
useErrorHandle: isProdMode(), |
2f6253
|
159 |
|
41d790
|
160 |
// Whether to open back to top |
2f6253
|
161 |
useOpenBackTop: true, |
陈 |
162 |
|
41d790
|
163 |
// Is it possible to embed iframe pages |
2f6253
|
164 |
canEmbedIFramePage: true, |
e83cb0
|
165 |
|
41d790
|
166 |
// Whether to delete unclosed messages and notify when switching the interface |
e83cb0
|
167 |
closeMessageOnSwitch: true, |
N |
168 |
|
41d790
|
169 |
// Whether to cancel the http request that has been sent but not responded when switching the interface. |
V |
170 |
// If it is enabled, I want to overwrite a single interface. Can be set in a separate interface |
e83cb0
|
171 |
removeAllHttpPending: true, |
2f6253
|
172 |
}; |
陈 |
173 |
|
|
174 |
export default setting; |