vben
2020-12-22 f69aaeab5e6e78a638601cc63c22072847b3204d
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
import type { ProjectConfig } from '/@/types/config';
 
import { MenuTypeEnum, MenuModeEnum, TriggerEnum } from '/@/enums/menuEnum';
import { CacheTypeEnum } from '/@/enums/cacheEnum';
import { ContentEnum, PermissionModeEnum, ThemeEnum, RouterTransitionEnum } from '/@/enums/appEnum';
import { primaryColor } from '../../build/config/lessModifyVars';
import { isProdMode } from '/@/utils/env';
 
// ! You need to clear the browser cache after the change
const setting: ProjectConfig = {
  // Whether to show the configuration button
  showSettingButton: true,
 
  // Permission mode
  permissionMode: PermissionModeEnum.ROLE,
 
  // Permission-related cache is stored in sessionStorage or localStorage
  permissionCacheType: CacheTypeEnum.LOCAL,
 
  // color
  // TODO Theme color
  themeColor: primaryColor,
 
  // 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
  showLogo: true,
 
  // Whether to show footer
  showFooter: true,
 
  // locale setting
  locale: {
    show: true,
    // Locale
    lang: 'zh_CN',
    // Default locale
    fallback: 'zh_CN',
    // available Locales
    availableLocales: ['zh_CN', 'en'],
  },
 
  // Header configuration
  headerSetting: {
    // header bg color
    bgColor: '#ffffff',
    // 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,
  },
 
  // Menu configuration
  menuSetting: {
    // sidebar menu bg color
    bgColor: '#273352',
    //  Whether to fix the left menu
    fixed: true,
    // Menu collapse
    collapsed: 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: true,
    // Whether to show no dom
    show: true,
    // Whether to show dom
    hidden: false,
    // Menu width
    menuWidth: 210,
    // Menu mode
    mode: MenuModeEnum.INLINE,
    // Menu type
    type: MenuTypeEnum.SIDEBAR,
    // Menu theme
    theme: ThemeEnum.DARK,
    // 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,
  },
 
  // Multi-label
  multiTabsSetting: {
    // 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,
  },
 
  // Transition Setting
  transitionSetting: {
    //  Whether to open the page switching animation
    // The disabled state will also disable pageLoadinng
    enable: true,
 
    // Route basic switching animation
    basicTransition: RouterTransitionEnum.FADE_SIDE,
 
    // Whether to open page switching loading
    // Only open when enable=true
    openPageLoading: true,
 
    // Whether to open the top progress bar
    openNProgress: false,
  },
 
  // Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
  openKeepAlive: true,
 
  // Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
  lockTime: 0,
 
  // Whether to show breadcrumbs
  showBreadCrumb: true,
 
  // Whether to show the breadcrumb icon
  showBreadCrumbIcon: false,
 
  // Use error-handler-plugin
  useErrorHandle: isProdMode(),
 
  // Whether to open back to top
  useOpenBackTop: true,
 
  //  Is it possible to embed iframe pages
  canEmbedIFramePage: true,
 
  // Whether to delete unclosed messages and notify when switching the interface
  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
  removeAllHttpPending: true,
};
 
export default setting;