Blame view

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

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

export default setting;