Blame view

src/settings/projectSetting.ts 4.68 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';
vben authored
11
import { primaryColor, themeMode } from '../../build/config/themeConfig';
12
13
// ! You need to clear the browser cache after the change
陈文彬 authored
14
15
16
const setting: ProjectConfig = {
  // Whether to show the configuration button
  showSettingButton: true,
vben authored
17
18
19
20
  // `Settings` button position
  settingButtonPosition: SettingButtonPositionEnum.AUTO,
vben authored
21
  // Permission mode
22
  permissionMode: PermissionModeEnum.BACK,
vben authored
23
24
  // Permission-related cache is stored in sessionStorage or localStorage
25
  permissionCacheType: CacheTypeEnum.SESSION,
26
vben authored
27
28
  // color
  themeColor: primaryColor,
29
vben authored
30
31
  // TODO dark theme
  themeMode: themeMode,
vben authored
32
33

  // Website gray mode, open for possible mourning dates
陈文彬 authored
34
  grayMode: false,
vben authored
35
vben authored
36
  // Color Weakness Mode
陈文彬 authored
37
  colorWeak: false,
38
vben authored
39
  // Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems
陈文彬 authored
40
  fullContent: false,
vben authored
41
陈文彬 authored
42
43
  // content mode
  contentMode: ContentEnum.FULL,
vben authored
44
vben authored
45
  // Whether to display the logo
陈文彬 authored
46
47
  showLogo: true,
vben authored
48
  // Whether to show footer
49
  showFooter: false,
vben authored
50
vben authored
51
  // Header configuration
陈文彬 authored
52
  headerSetting: {
vben authored
53
54
    // header bg color
    bgColor: '#ffffff',
vben authored
55
    // Fixed at the top
陈文彬 authored
56
    fixed: true,
vben authored
57
    // Whether to show top
陈文彬 authored
58
59
    show: true,
    // theme
vben authored
60
    theme: ThemeEnum.LIGHT,
vben authored
61
    // Whether to enable the lock screen function
vben authored
62
    useLockPage: true,
vben authored
63
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
vben authored
77
    bgColor: '#001529',
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: {
vben authored
117
    // Turn on
陈文彬 authored
118
    show: true,
119
120
    // Is it possible to drag and drop sorting tabs
    canDrag: true,
vben authored
121
    // Turn on quick actions
陈文彬 authored
122
    showQuick: true,
vben authored
123
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;