Blame view

src/settings/projectSetting.ts 4.8 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, themeMode } 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
19
20
21
  // `Settings` button position
  settingButtonPosition: SettingButtonPositionEnum.AUTO,
vben authored
22
  // Permission mode
23
  permissionMode: PermissionModeEnum.ROLE,
vben authored
24
25
  // Permission-related cache is stored in sessionStorage or localStorage
Vben authored
26
  permissionCacheType: CacheTypeEnum.LOCAL,
27
vben authored
28
29
  // color
  themeColor: primaryColor,
30
vben authored
31
32
  // TODO dark theme
  themeMode: themeMode,
vben authored
33
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
vben authored
65
    // Whether to show the full screen button
陈文彬 authored
66
    showFullScreen: true,
vben authored
67
    // Whether to show the document button
陈文彬 authored
68
    showDoc: true,
vben authored
69
    // Whether to show the notification button
chen-xt authored
70
    showNotice: true,
vben authored
71
72
    // Whether to display the menu search
    showSearch: true,
陈文彬 authored
73
  },
vben authored
74
vben authored
75
  // Menu configuration
陈文彬 authored
76
  menuSetting: {
vben authored
77
    // sidebar menu bg color
78
    bgColor: SIDE_BAR_BG_COLOR_LIST[0],
vben authored
79
    //  Whether to fix the left menu
vben authored
80
    fixed: true,
vben authored
81
    // Menu collapse
陈文彬 authored
82
    collapsed: false,
vben authored
83
84
    // Whether to display the menu name when folding the menu
    collapsedShowTitle: false,
vben authored
85
86
    // 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
87
    canDrag: false,
vben authored
88
    // Whether to show no dom
陈文彬 authored
89
    show: true,
vben authored
90
    // Whether to show dom
91
    hidden: false,
vben authored
92
    // Menu width
vben authored
93
    menuWidth: 210,
vben authored
94
    // Menu mode
陈文彬 authored
95
    mode: MenuModeEnum.INLINE,
vben authored
96
    // Menu type
陈文彬 authored
97
    type: MenuTypeEnum.SIDEBAR,
vben authored
98
    // Menu theme
vben authored
99
    theme: ThemeEnum.DARK,
vben authored
100
    // Split menu
陈文彬 authored
101
    split: false,
vben authored
102
    // Top menu layout
103
    topMenuAlign: 'center',
vben authored
104
    // Fold trigger position
105
    trigger: TriggerEnum.HEADER,
vben authored
106
    // Turn on accordion mode, only show a menu
107
    accordion: true,
108
109
    // Switch page to close menu
    closeMixSidebarOnChange: false,
110
    // Module opening method ‘click’ |'hover'
111
    mixSideTrigger: MixSidebarTriggerEnum.CLICK,
112
113
    // Fixed expanded menu
    mixSideFixed: false,
陈文彬 authored
114
  },
vben authored
115
vben authored
116
  // Multi-label
陈文彬 authored
117
  multiTabsSetting: {
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
126

    // Whether to show the refresh button
    showRedo: true,
vben authored
127
128
    // Whether to show the collapse button
    showFold: true,
陈文彬 authored
129
  },
vben authored
130
vben authored
131
132
133
134
135
136
137
138
139
140
141
142
143
144
  // 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
145
    openNProgress: false,
vben authored
146
147
148
  },

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

export default setting;