projectSetting.ts 5.0 KB
Newer Older
V
Vben 已提交
1
import type { ProjectConfig } from '/#/config';
2
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
V
vben 已提交
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';
V
vben 已提交
13

V
vben 已提交
14
const primaryColor = '#0960bd';
V
vben 已提交
15

V
vben 已提交
16
// ! You need to clear the browser cache after the change
陈文彬 已提交
17 18 19
const setting: ProjectConfig = {
  // Whether to show the configuration button
  showSettingButton: true,
V
vben 已提交
20

V
Vben 已提交
21 22 23
  // Whether to show the theme switch button
  showDarkModeToggle: true,

24 25 26
  // `Settings` button position
  settingButtonPosition: SettingButtonPositionEnum.AUTO,

V
vben 已提交
27
  // Permission mode
28
  permissionMode: PermissionModeEnum.ROUTE_MAPPING,
V
vben 已提交
29

V
vben 已提交
30
  // Permission-related cache is stored in sessionStorage or localStorage
V
Vben 已提交
31
  permissionCacheType: CacheTypeEnum.LOCAL,
V
vben 已提交
32

33 34 35
  // Session timeout processing
  sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP,

V
vben 已提交
36 37
  // color
  themeColor: primaryColor,
38

V
vben 已提交
39
  // Website gray mode, open for possible mourning dates
陈文彬 已提交
40
  grayMode: false,
V
vben 已提交
41

V
vben 已提交
42
  // Color Weakness Mode
陈文彬 已提交
43
  colorWeak: false,
44

V
vben 已提交
45
  // Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems
陈文彬 已提交
46
  fullContent: false,
V
vben 已提交
47

陈文彬 已提交
48 49
  // content mode
  contentMode: ContentEnum.FULL,
V
vben 已提交
50

V
vben 已提交
51
  // Whether to display the logo
陈文彬 已提交
52 53
  showLogo: true,

V
vben 已提交
54
  // Whether to show footer
55
  showFooter: false,
V
vben 已提交
56

V
vben 已提交
57
  // Header configuration
陈文彬 已提交
58
  headerSetting: {
V
vben 已提交
59
    // header bg color
60
    bgColor: HEADER_PRESET_BG_COLOR_LIST[0],
V
vben 已提交
61
    // Fixed at the top
陈文彬 已提交
62
    fixed: true,
V
vben 已提交
63
    // Whether to show top
陈文彬 已提交
64 65
    show: true,
    // theme
V
vben 已提交
66
    theme: ThemeEnum.LIGHT,
V
vben 已提交
67
    // Whether to enable the lock screen function
V
vben 已提交
68
    useLockPage: true,
V
vben 已提交
69
    // Whether to show the full screen button
陈文彬 已提交
70
    showFullScreen: true,
V
vben 已提交
71
    // Whether to show the document button
陈文彬 已提交
72
    showDoc: true,
V
vben 已提交
73
    // Whether to show the notification button
C
chen-xt 已提交
74
    showNotice: true,
V
vben 已提交
75 76
    // Whether to display the menu search
    showSearch: true,
陈文彬 已提交
77
  },
V
vben 已提交
78

V
vben 已提交
79
  // Menu configuration
陈文彬 已提交
80
  menuSetting: {
V
vben 已提交
81
    // sidebar menu bg color
82
    bgColor: SIDE_BAR_BG_COLOR_LIST[0],
V
vben 已提交
83
    //  Whether to fix the left menu
V
vben 已提交
84
    fixed: true,
V
vben 已提交
85
    // Menu collapse
陈文彬 已提交
86
    collapsed: false,
87 88
    // When sider hide because of the responsive layout
    siderHidden: false,
V
vben 已提交
89 90
    // Whether to display the menu name when folding the menu
    collapsedShowTitle: false,
V
vben 已提交
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,
V
vben 已提交
94
    // Whether to show no dom
陈文彬 已提交
95
    show: true,
V
vben 已提交
96
    // Whether to show dom
V
vben 已提交
97
    hidden: false,
V
vben 已提交
98
    // Menu width
V
vben 已提交
99
    menuWidth: 210,
V
vben 已提交
100
    // Menu mode
陈文彬 已提交
101
    mode: MenuModeEnum.INLINE,
V
vben 已提交
102
    // Menu type
陈文彬 已提交
103
    type: MenuTypeEnum.SIDEBAR,
V
vben 已提交
104
    // Menu theme
V
vben 已提交
105
    theme: ThemeEnum.DARK,
V
vben 已提交
106
    // Split menu
陈文彬 已提交
107
    split: false,
V
vben 已提交
108
    // Top menu layout
V
vben 已提交
109
    topMenuAlign: 'center',
V
vben 已提交
110
    // Fold trigger position
V
vben 已提交
111
    trigger: TriggerEnum.HEADER,
V
vben 已提交
112
    // Turn on accordion mode, only show a menu
V
vben 已提交
113
    accordion: true,
V
vben 已提交
114 115
    // Switch page to close menu
    closeMixSidebarOnChange: false,
V
vben 已提交
116
    // Module opening method ‘click’ |'hover'
117
    mixSideTrigger: MixSidebarTriggerEnum.CLICK,
118 119
    // Fixed expanded menu
    mixSideFixed: false,
陈文彬 已提交
120
  },
V
vben 已提交
121

V
vben 已提交
122
  // Multi-label
陈文彬 已提交
123
  multiTabsSetting: {
V
Vben 已提交
124
    cache: false,
V
vben 已提交
125
    // Turn on
陈文彬 已提交
126
    show: true,
V
vben 已提交
127 128
    // Is it possible to drag and drop sorting tabs
    canDrag: true,
V
vben 已提交
129
    // Turn on quick actions
陈文彬 已提交
130
    showQuick: true,
V
vben 已提交
131 132
    // Whether to show the refresh button
    showRedo: true,
V
vben 已提交
133 134
    // Whether to show the collapse button
    showFold: true,
陈文彬 已提交
135
  },
V
vben 已提交
136

V
vben 已提交
137 138 139
  // Transition Setting
  transitionSetting: {
    //  Whether to open the page switching animation
140
    // The disabled state will also disable pageLoading
V
vben 已提交
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
V
vben 已提交
151
    openNProgress: false,
V
vben 已提交
152 153 154
  },

  // Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
陈文彬 已提交
155 156
  openKeepAlive: true,

V
vben 已提交
157
  // Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
陈文彬 已提交
158
  lockTime: 0,
V
vben 已提交
159

V
vben 已提交
160
  // Whether to show breadcrumbs
陈文彬 已提交
161
  showBreadCrumb: true,
V
vben 已提交
162

V
vben 已提交
163
  // Whether to show the breadcrumb icon
Z
ZhaoBin 已提交
164
  showBreadCrumbIcon: false,
陈文彬 已提交
165

V
vben 已提交
166
  // Use error-handler-plugin
V
vben 已提交
167
  useErrorHandle: false,
陈文彬 已提交
168

V
vben 已提交
169
  // Whether to open back to top
陈文彬 已提交
170 171
  useOpenBackTop: true,

V
vben 已提交
172
  //  Is it possible to embed iframe pages
陈文彬 已提交
173
  canEmbedIFramePage: true,
174

V
vben 已提交
175
  // Whether to delete unclosed messages and notify when switching the interface
176 177
  closeMessageOnSwitch: true,

V
vben 已提交
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
V
vben 已提交
180
  removeAllHttpPending: false,
陈文彬 已提交
181 182 183
};

export default setting;