Blame view

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

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

export default setting;