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