提交 | 用户 | age
|
4d2fb0
|
1 |
import type { ProjectConfig } from '#/config'; |
X |
2 |
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '@/enums/menuEnum'; |
|
3 |
import { CacheTypeEnum } from '@/enums/cacheEnum'; |
da0491
|
4 |
import { |
V |
5 |
ContentEnum, |
|
6 |
PermissionModeEnum, |
|
7 |
ThemeEnum, |
|
8 |
RouterTransitionEnum, |
|
9 |
SettingButtonPositionEnum, |
0d0708
|
10 |
SessionTimeoutProcessingEnum, |
4d2fb0
|
11 |
} from '@/enums/appEnum'; |
509541
|
12 |
import { |
Z |
13 |
SIDE_BAR_BG_COLOR_LIST, |
|
14 |
HEADER_PRESET_BG_COLOR_LIST, |
|
15 |
APP_PRESET_COLOR_LIST, |
|
16 |
} from './designSetting'; |
dc42d4
|
17 |
|
21a225
|
18 |
// ! You need to clear the browser cache after the change |
5f033b
|
19 |
// ! 改动后需要清空浏览器缓存 |
2f6253
|
20 |
const setting: ProjectConfig = { |
41d790
|
21 |
// Whether to show the configuration button |
5f033b
|
22 |
// 是否显示SettingButton |
41d790
|
23 |
showSettingButton: true, |
5b8eb4
|
24 |
|
V |
25 |
// Whether to show the theme switch button |
5f033b
|
26 |
// 是否显示主题切换按钮 |
5b8eb4
|
27 |
showDarkModeToggle: true, |
41d790
|
28 |
|
da0491
|
29 |
// `Settings` button position |
5f033b
|
30 |
// 设置按钮位置 可选项 |
S |
31 |
// SettingButtonPositionEnum.AUTO: 自动选择 |
|
32 |
// SettingButtonPositionEnum.HEADER: 位于头部 |
|
33 |
// SettingButtonPositionEnum.FIXED: 固定在右侧 |
da0491
|
34 |
settingButtonPosition: SettingButtonPositionEnum.AUTO, |
V |
35 |
|
41d790
|
36 |
// Permission mode |
5f033b
|
37 |
// 权限模式,默认前端角色权限模式 |
S |
38 |
// ROUTE_MAPPING: 前端模式(菜单由路由生成,默认) |
|
39 |
// ROLE:前端模式(菜单路由分开) |
913c22
|
40 |
permissionMode: PermissionModeEnum.ROUTE_MAPPING, |
26b610
|
41 |
|
V |
42 |
// Permission-related cache is stored in sessionStorage or localStorage |
5f033b
|
43 |
// 权限缓存存放位置。默认存放于localStorage |
fedd9c
|
44 |
permissionCacheType: CacheTypeEnum.LOCAL, |
41d790
|
45 |
|
0d0708
|
46 |
// Session timeout processing |
5f033b
|
47 |
// 会话超时处理方案 |
S |
48 |
// SessionTimeoutProcessingEnum.ROUTE_JUMP: 路由跳转到登录页 |
|
49 |
// SessionTimeoutProcessingEnum.PAGE_COVERAGE: 生成登录弹窗,覆盖当前页面 |
0d0708
|
50 |
sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP, |
V |
51 |
|
41d790
|
52 |
// color |
5f033b
|
53 |
// 项目主题色 |
S |
54 |
themeColor: APP_PRESET_COLOR_LIST[1], |
41d790
|
55 |
|
V |
56 |
// Website gray mode, open for possible mourning dates |
5f033b
|
57 |
// 网站灰色模式,用于可能悼念的日期开启 |
41d790
|
58 |
grayMode: false, |
V |
59 |
|
|
60 |
// Color Weakness Mode |
5f033b
|
61 |
// 色弱模式 |
41d790
|
62 |
colorWeak: false, |
V |
63 |
|
|
64 |
// Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems |
5f033b
|
65 |
// 是否取消菜单,顶部,多标签页显示, 用于可能内嵌在别的系统内 |
41d790
|
66 |
fullContent: false, |
V |
67 |
|
|
68 |
// content mode |
5f033b
|
69 |
// 主题内容宽度 |
41d790
|
70 |
contentMode: ContentEnum.FULL, |
V |
71 |
|
|
72 |
// Whether to display the logo |
5f033b
|
73 |
// 是否显示logo |
41d790
|
74 |
showLogo: true, |
V |
75 |
|
|
76 |
// Whether to show footer |
5f033b
|
77 |
// 是否显示底部信息 copyright |
ebf7c8
|
78 |
showFooter: false, |
737b1b
|
79 |
|
41d790
|
80 |
// Header configuration |
5f033b
|
81 |
// 头部配置 |
2f6253
|
82 |
headerSetting: { |
0692b4
|
83 |
// header bg color |
5f033b
|
84 |
// 背景色 |
82c318
|
85 |
bgColor: HEADER_PRESET_BG_COLOR_LIST[0], |
41d790
|
86 |
// Fixed at the top |
5f033b
|
87 |
// 是否固定头部 |
2f6253
|
88 |
fixed: true, |
41d790
|
89 |
// Whether to show top |
5f033b
|
90 |
// 是否显示顶部 |
2f6253
|
91 |
show: true, |
陈 |
92 |
// theme |
5f033b
|
93 |
// 主题 |
46e087
|
94 |
theme: ThemeEnum.LIGHT, |
41d790
|
95 |
// Whether to enable the lock screen function |
5f033b
|
96 |
// 开启锁屏功能 |
710158
|
97 |
useLockPage: true, |
41d790
|
98 |
// Whether to show the full screen button |
5f033b
|
99 |
// 显示全屏按钮 |
2f6253
|
100 |
showFullScreen: true, |
41d790
|
101 |
// Whether to show the document button |
5f033b
|
102 |
// 显示文档按钮 |
2f6253
|
103 |
showDoc: true, |
41d790
|
104 |
// Whether to show the notification button |
5f033b
|
105 |
// 显示消息中心按钮 |
7a1e94
|
106 |
showNotice: true, |
dddda5
|
107 |
// Whether to display the menu search |
5f033b
|
108 |
// 显示菜单搜索按钮 |
dddda5
|
109 |
showSearch: true, |
00bf5d
|
110 |
showApi: true, |
2f6253
|
111 |
}, |
ba068b
|
112 |
|
41d790
|
113 |
// Menu configuration |
5f033b
|
114 |
// 菜单配置 |
2f6253
|
115 |
menuSetting: { |
0692b4
|
116 |
// sidebar menu bg color |
5f033b
|
117 |
// 背景色 |
S |
118 |
bgColor: SIDE_BAR_BG_COLOR_LIST[3], |
41d790
|
119 |
// Whether to fix the left menu |
5f033b
|
120 |
// 是否固定住菜单 |
0692b4
|
121 |
fixed: true, |
41d790
|
122 |
// Menu collapse |
5f033b
|
123 |
// 是否菜单折叠 |
2f6253
|
124 |
collapsed: false, |
554f46
|
125 |
// When sider hide because of the responsive layout |
Y |
126 |
siderHidden: false, |
f69aae
|
127 |
// Whether to display the menu name when folding the menu |
5f033b
|
128 |
// 折叠菜单时候是否显示菜单名 |
f69aae
|
129 |
collapsedShowTitle: false, |
41d790
|
130 |
// Whether it can be dragged |
V |
131 |
// Only limited to the opening of the left menu, the mouse has a drag bar on the right side of the menu |
5f033b
|
132 |
// 是否可拖拽 |
31ff05
|
133 |
canDrag: false, |
41d790
|
134 |
// Whether to show no dom |
5f033b
|
135 |
// 是否显示 |
2f6253
|
136 |
show: true, |
41d790
|
137 |
// Whether to show dom |
c774a6
|
138 |
hidden: false, |
41d790
|
139 |
// Menu width |
5f033b
|
140 |
// 菜单宽度 |
28c484
|
141 |
menuWidth: 150, |
41d790
|
142 |
// Menu mode |
5f033b
|
143 |
// 菜单模式 |
2f6253
|
144 |
mode: MenuModeEnum.INLINE, |
41d790
|
145 |
// Menu type |
5f033b
|
146 |
// 菜单类型 |
S |
147 |
type: MenuTypeEnum.MIX_SIDEBAR, |
41d790
|
148 |
// Menu theme |
5f033b
|
149 |
// 菜单主题 |
S |
150 |
theme: ThemeEnum.LIGHT, |
41d790
|
151 |
// Split menu |
5f033b
|
152 |
// 分割菜单 |
2f6253
|
153 |
split: false, |
41d790
|
154 |
// Top menu layout |
5f033b
|
155 |
// 顶部菜单布局 |
770283
|
156 |
topMenuAlign: 'center', |
41d790
|
157 |
// Fold trigger position |
5f033b
|
158 |
// 折叠触发器的位置 |
4f6b65
|
159 |
trigger: TriggerEnum.HEADER, |
41d790
|
160 |
// Turn on accordion mode, only show a menu |
5f033b
|
161 |
// 手风琴模式,只展示一个菜单 |
4ff6b7
|
162 |
accordion: true, |
e6db0d
|
163 |
// Switch page to close menu |
5f033b
|
164 |
// 在路由切换的时候关闭左侧混合菜单展开菜单 |
e6db0d
|
165 |
closeMixSidebarOnChange: false, |
0419a0
|
166 |
// Module opening method ‘click’ |'hover' |
5f033b
|
167 |
// 左侧混合菜单模块切换触发方式 |
e821f4
|
168 |
mixSideTrigger: MixSidebarTriggerEnum.CLICK, |
97180e
|
169 |
// Fixed expanded menu |
5f033b
|
170 |
// 是否固定左侧混合菜单 |
S |
171 |
mixSideFixed: true, |
2f6253
|
172 |
}, |
737b1b
|
173 |
|
41d790
|
174 |
// Multi-label |
5f033b
|
175 |
// 多标签页设置 |
2f6253
|
176 |
multiTabsSetting: { |
5f033b
|
177 |
// 刷新后是否保留已经打开的标签页 |
967b28
|
178 |
cache: false, |
41d790
|
179 |
// Turn on |
5f033b
|
180 |
// 开启 |
2f6253
|
181 |
show: true, |
cedba3
|
182 |
// Is it possible to drag and drop sorting tabs |
5f033b
|
183 |
// 是否可以拖拽 |
cedba3
|
184 |
canDrag: true, |
41d790
|
185 |
// Turn on quick actions |
5f033b
|
186 |
// 开启快速操作 |
2f6253
|
187 |
showQuick: true, |
a65ad9
|
188 |
// Whether to show the refresh button |
5f033b
|
189 |
// 是否显示刷新按钮 |
a65ad9
|
190 |
showRedo: true, |
0e7c57
|
191 |
// Whether to show the collapse button |
5f033b
|
192 |
// 是否显示折叠按钮 |
0e7c57
|
193 |
showFold: true, |
191e80
|
194 |
// Auto collapsed |
X |
195 |
autoCollapse: false, |
2f6253
|
196 |
}, |
ba068b
|
197 |
|
41d790
|
198 |
// Transition Setting |
5f033b
|
199 |
// 动画配置 |
41d790
|
200 |
transitionSetting: { |
V |
201 |
// Whether to open the page switching animation |
f96453
|
202 |
// The disabled state will also disable pageLoading |
5f033b
|
203 |
// 是否开启切换动画 |
41d790
|
204 |
enable: true, |
V |
205 |
|
|
206 |
// Route basic switching animation |
5f033b
|
207 |
// 动画名 |
41d790
|
208 |
basicTransition: RouterTransitionEnum.FADE_SIDE, |
V |
209 |
|
|
210 |
// Whether to open page switching loading |
|
211 |
// Only open when enable=true |
5f033b
|
212 |
// 是否打开页面切换loading |
41d790
|
213 |
openPageLoading: true, |
V |
214 |
|
|
215 |
// Whether to open the top progress bar |
5f033b
|
216 |
// 是否打开页面切换顶部进度条 |
S |
217 |
openNProgress: true, |
41d790
|
218 |
}, |
V |
219 |
|
|
220 |
// Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time |
5f033b
|
221 |
// 是否开启KeepAlive缓存 开发时候最好关闭,不然每次都需要清除缓存 |
2f6253
|
222 |
openKeepAlive: true, |
陈 |
223 |
|
41d790
|
224 |
// Automatic screen lock time, 0 does not lock the screen. Unit minute default 0 |
5f033b
|
225 |
// 自动锁屏时间,为0不锁屏。 单位分钟 默认1个小时 |
2f6253
|
226 |
lockTime: 0, |
ba068b
|
227 |
|
41d790
|
228 |
// Whether to show breadcrumbs |
5f033b
|
229 |
// 显示面包屑 |
2f6253
|
230 |
showBreadCrumb: true, |
ba068b
|
231 |
|
41d790
|
232 |
// Whether to show the breadcrumb icon |
5f033b
|
233 |
// 显示面包屑图标 |
d8b25b
|
234 |
showBreadCrumbIcon: false, |
2f6253
|
235 |
|
41d790
|
236 |
// Use error-handler-plugin |
5f033b
|
237 |
// 是否使用全局错误捕获 |
b5c161
|
238 |
useErrorHandle: false, |
2f6253
|
239 |
|
41d790
|
240 |
// Whether to open back to top |
5f033b
|
241 |
// 是否开启回到顶部 |
2f6253
|
242 |
useOpenBackTop: true, |
陈 |
243 |
|
41d790
|
244 |
// Is it possible to embed iframe pages |
5f033b
|
245 |
// 是否可以嵌入iframe页面 |
2f6253
|
246 |
canEmbedIFramePage: true, |
e83cb0
|
247 |
|
41d790
|
248 |
// Whether to delete unclosed messages and notify when switching the interface |
5f033b
|
249 |
// 切换界面的时候是否删除未关闭的message及notify |
e83cb0
|
250 |
closeMessageOnSwitch: true, |
N |
251 |
|
41d790
|
252 |
// Whether to cancel the http request that has been sent but not responded when switching the interface. |
V |
253 |
// If it is enabled, I want to overwrite a single interface. Can be set in a separate interface |
5f033b
|
254 |
// 切换界面的时候是否取消已经发送但是未响应的http请求。 |
S |
255 |
// 如果开启,想对单独接口覆盖。可以在单独接口设置 |
99ac30
|
256 |
removeAllHttpPending: false, |
2f6253
|
257 |
}; |
陈 |
258 |
|
|
259 |
export default setting; |