projectSetting.ts 4.8 KB
Newer Older
陈文彬 已提交
1 2
import type { ProjectConfig } from '/@/types/config';

3
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
V
vben 已提交
4
import { CacheTypeEnum } from '/@/enums/cacheEnum';
V
vben 已提交
5
import { ContentEnum, PermissionModeEnum, ThemeEnum, RouterTransitionEnum } from '/@/enums/appEnum';
V
vben 已提交
6
import { primaryColor, themeMode } from '../../build/config/themeConfig';
V
vben 已提交
7

V
vben 已提交
8
// ! You need to clear the browser cache after the change
陈文彬 已提交
9 10 11
const setting: ProjectConfig = {
  // Whether to show the configuration button
  showSettingButton: true,
V
vben 已提交
12

V
vben 已提交
13
  // Permission mode
V
vben 已提交
14
  permissionMode: PermissionModeEnum.ROLE,
V
vben 已提交
15

V
vben 已提交
16 17 18
  // Permission-related cache is stored in sessionStorage or localStorage
  permissionCacheType: CacheTypeEnum.LOCAL,

V
vben 已提交
19 20 21
  // color
  // TODO Theme color
  themeColor: primaryColor,
V
vben 已提交
22 23
  // TODO dark theme
  themeMode: themeMode,
V
vben 已提交
24 25

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

V
vben 已提交
28
  // Color Weakness Mode
陈文彬 已提交
29
  colorWeak: false,
30

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

陈文彬 已提交
34 35
  // content mode
  contentMode: ContentEnum.FULL,
V
vben 已提交
36

V
vben 已提交
37
  // Whether to display the logo
陈文彬 已提交
38 39
  showLogo: true,

V
vben 已提交
40
  // Whether to show footer
41
  showFooter: false,
V
vben 已提交
42

V
vben 已提交
43 44
  // locale setting
  locale: {
V
vben 已提交
45
    show: true,
V
vben 已提交
46 47 48 49 50 51 52 53 54
    // Locale
    lang: 'zh_CN',
    // Default locale
    fallback: 'zh_CN',
    // available Locales
    availableLocales: ['zh_CN', 'en'],
  },

  // Header configuration
陈文彬 已提交
55
  headerSetting: {
V
vben 已提交
56 57
    // header bg color
    bgColor: '#ffffff',
V
vben 已提交
58
    // Fixed at the top
陈文彬 已提交
59
    fixed: true,
V
vben 已提交
60
    // Whether to show top
陈文彬 已提交
61 62
    show: true,
    // theme
V
vben 已提交
63
    theme: ThemeEnum.LIGHT,
V
vben 已提交
64
    // Whether to enable the lock screen function
V
vben 已提交
65
    useLockPage: true,
V
vben 已提交
66

V
vben 已提交
67
    // Whether to show the full screen button
陈文彬 已提交
68
    showFullScreen: true,
V
vben 已提交
69
    // Whether to show the document button
陈文彬 已提交
70
    showDoc: true,
V
vben 已提交
71
    // Whether to show the notification button
C
chen-xt 已提交
72
    showNotice: true,
V
vben 已提交
73 74
    // Whether to display the menu search
    showSearch: true,
陈文彬 已提交
75
  },
V
vben 已提交
76

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

V
vben 已提交
118
  // Multi-label
陈文彬 已提交
119
  multiTabsSetting: {
V
vben 已提交
120
    // Turn on
陈文彬 已提交
121
    show: true,
V
vben 已提交
122 123
    // Is it possible to drag and drop sorting tabs
    canDrag: true,
V
vben 已提交
124
    // Turn on quick actions
陈文彬 已提交
125
    showQuick: true,
V
vben 已提交
126 127 128

    // Whether to show the refresh button
    showRedo: true,
V
vben 已提交
129 130
    // Whether to show the collapse button
    showFold: true,
陈文彬 已提交
131
  },
V
vben 已提交
132

V
vben 已提交
133 134 135 136 137 138 139 140 141 142 143 144 145 146
  // 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
V
vben 已提交
147
    openNProgress: false,
V
vben 已提交
148 149 150
  },

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

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

V
vben 已提交
156
  // Whether to show breadcrumbs
陈文彬 已提交
157
  showBreadCrumb: true,
V
vben 已提交
158

V
vben 已提交
159
  // Whether to show the breadcrumb icon
Z
ZhaoBin 已提交
160
  showBreadCrumbIcon: false,
陈文彬 已提交
161

V
vben 已提交
162
  // Use error-handler-plugin
V
vben 已提交
163
  useErrorHandle: false,
陈文彬 已提交
164

V
vben 已提交
165
  // Whether to open back to top
陈文彬 已提交
166 167
  useOpenBackTop: true,

V
vben 已提交
168
  //  Is it possible to embed iframe pages
陈文彬 已提交
169
  canEmbedIFramePage: true,
170

V
vben 已提交
171
  // Whether to delete unclosed messages and notify when switching the interface
172 173
  closeMessageOnSwitch: true,

V
vben 已提交
174 175
  // 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 已提交
176
  removeAllHttpPending: false,
陈文彬 已提交
177 178 179
};

export default setting;