Blame view

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

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

export default setting;