Blame view

src/settings/projectSetting.ts 5.06 KB
Vben authored
1
import type { ProjectConfig } from '/#/config';
2
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
3
import { CacheTypeEnum } from '/@/enums/cacheEnum';
4
5
6
7
8
9
import {
  ContentEnum,
  PermissionModeEnum,
  ThemeEnum,
  RouterTransitionEnum,
  SettingButtonPositionEnum,
10
  SessionTimeoutProcessingEnum,
11
} from '/@/enums/appEnum';
12
import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting';
13
14
const primaryColor = '#0960bd';
15
16
// ! You need to clear the browser cache after the change
陈文彬 authored
17
18
19
const setting: ProjectConfig = {
  // Whether to show the configuration button
  showSettingButton: true,
vben authored
20
Vben authored
21
22
23
  // Whether to show the theme switch button
  showDarkModeToggle: true,
24
25
26
  // `Settings` button position
  settingButtonPosition: SettingButtonPositionEnum.AUTO,
vben authored
27
  // Permission mode
sanmu authored
28
  // permissionMode: PermissionModeEnum.ROLE,
29
  permissionMode: PermissionModeEnum.ROUTE_MAPPING,
vben authored
30
31
  // Permission-related cache is stored in sessionStorage or localStorage
Vben authored
32
  permissionCacheType: CacheTypeEnum.LOCAL,
33
34
35
36
  // Session timeout processing
  sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP,
vben authored
37
38
  // color
  themeColor: primaryColor,
39
vben authored
40
  // Website gray mode, open for possible mourning dates
陈文彬 authored
41
  grayMode: false,
vben authored
42
vben authored
43
  // Color Weakness Mode
陈文彬 authored
44
  colorWeak: false,
45
vben authored
46
  // Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems
陈文彬 authored
47
  fullContent: false,
vben authored
48
陈文彬 authored
49
50
  // content mode
  contentMode: ContentEnum.FULL,
vben authored
51
vben authored
52
  // Whether to display the logo
陈文彬 authored
53
54
  showLogo: true,
vben authored
55
  // Whether to show footer
56
  showFooter: false,
vben authored
57
vben authored
58
  // Header configuration
陈文彬 authored
59
  headerSetting: {
vben authored
60
    // header bg color
61
    bgColor: HEADER_PRESET_BG_COLOR_LIST[0],
vben authored
62
    // Fixed at the top
陈文彬 authored
63
    fixed: true,
vben authored
64
    // Whether to show top
陈文彬 authored
65
66
    show: true,
    // theme
vben authored
67
    theme: ThemeEnum.LIGHT,
vben authored
68
    // Whether to enable the lock screen function
vben authored
69
    useLockPage: true,
vben authored
70
    // Whether to show the full screen button
陈文彬 authored
71
    showFullScreen: true,
vben authored
72
    // Whether to show the document button
陈文彬 authored
73
    showDoc: true,
vben authored
74
    // Whether to show the notification button
chen-xt authored
75
    showNotice: true,
vben authored
76
77
    // Whether to display the menu search
    showSearch: true,
陈文彬 authored
78
  },
vben authored
79
vben authored
80
  // Menu configuration
陈文彬 authored
81
  menuSetting: {
vben authored
82
    // sidebar menu bg color
83
    bgColor: SIDE_BAR_BG_COLOR_LIST[0],
vben authored
84
    //  Whether to fix the left menu
vben authored
85
    fixed: true,
vben authored
86
    // Menu collapse
陈文彬 authored
87
    collapsed: false,
88
89
    // When sider hide because of the responsive layout
    siderHidden: false,
vben authored
90
91
    // Whether to display the menu name when folding the menu
    collapsedShowTitle: false,
vben authored
92
93
    // 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
94
    canDrag: false,
vben authored
95
    // Whether to show no dom
陈文彬 authored
96
    show: true,
vben authored
97
    // Whether to show dom
98
    hidden: false,
vben authored
99
    // Menu width
vben authored
100
    menuWidth: 210,
vben authored
101
    // Menu mode
陈文彬 authored
102
    mode: MenuModeEnum.INLINE,
vben authored
103
    // Menu type
陈文彬 authored
104
    type: MenuTypeEnum.SIDEBAR,
vben authored
105
    // Menu theme
vben authored
106
    theme: ThemeEnum.DARK,
vben authored
107
    // Split menu
陈文彬 authored
108
    split: false,
vben authored
109
    // Top menu layout
110
    topMenuAlign: 'center',
vben authored
111
    // Fold trigger position
112
    trigger: TriggerEnum.HEADER,
vben authored
113
    // Turn on accordion mode, only show a menu
114
    accordion: true,
115
116
    // Switch page to close menu
    closeMixSidebarOnChange: false,
117
    // Module opening method ‘click’ |'hover'
118
    mixSideTrigger: MixSidebarTriggerEnum.CLICK,
119
120
    // Fixed expanded menu
    mixSideFixed: false,
陈文彬 authored
121
  },
vben authored
122
vben authored
123
  // Multi-label
陈文彬 authored
124
  multiTabsSetting: {
125
    cache: false,
vben authored
126
    // Turn on
陈文彬 authored
127
    show: true,
128
129
    // Is it possible to drag and drop sorting tabs
    canDrag: true,
vben authored
130
    // Turn on quick actions
陈文彬 authored
131
    showQuick: true,
vben authored
132
133
    // Whether to show the refresh button
    showRedo: true,
vben authored
134
135
    // Whether to show the collapse button
    showFold: true,
陈文彬 authored
136
  },
vben authored
137
vben authored
138
139
140
  // Transition Setting
  transitionSetting: {
    //  Whether to open the page switching animation
141
    // The disabled state will also disable pageLoading
vben authored
142
143
144
145
146
147
148
149
150
151
    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
152
    openNProgress: false,
vben authored
153
154
155
  },

  // Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
陈文彬 authored
156
157
  openKeepAlive: true,
vben authored
158
  // Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
陈文彬 authored
159
  lockTime: 0,
vben authored
160
vben authored
161
  // Whether to show breadcrumbs
陈文彬 authored
162
  showBreadCrumb: true,
vben authored
163
vben authored
164
  // Whether to show the breadcrumb icon
165
  showBreadCrumbIcon: false,
陈文彬 authored
166
vben authored
167
  // Use error-handler-plugin
168
  useErrorHandle: false,
陈文彬 authored
169
vben authored
170
  // Whether to open back to top
陈文彬 authored
171
172
  useOpenBackTop: true,
vben authored
173
  //  Is it possible to embed iframe pages
陈文彬 authored
174
  canEmbedIFramePage: true,
175
vben authored
176
  // Whether to delete unclosed messages and notify when switching the interface
177
178
  closeMessageOnSwitch: true,
vben authored
179
180
  // 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
vben authored
181
  removeAllHttpPending: false,
陈文彬 authored
182
183
184
};

export default setting;