Vben
2021-04-10 967b28c4c06cf92e9ab90cff51f59a0d6ced5d7b
提交 | 用户 | age
fcee7d 1 import type { ProjectConfig } from '/#/config';
e821f4 2 import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
26b610 3 import { CacheTypeEnum } from '/@/enums/cacheEnum';
da0491 4 import {
V 5   ContentEnum,
6   PermissionModeEnum,
7   ThemeEnum,
8   RouterTransitionEnum,
9   SettingButtonPositionEnum,
10 } from '/@/enums/appEnum';
82c318 11 import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting';
5b8eb4 12 import { primaryColor } from '../../build/config/themeConfig';
dc42d4 13
21a225 14 // ! You need to clear the browser cache after the change
2f6253 15 const setting: ProjectConfig = {
41d790 16   // Whether to show the configuration button
V 17   showSettingButton: true,
5b8eb4 18
V 19   // Whether to show the theme switch button
20   showDarkModeToggle: true,
41d790 21
da0491 22   // `Settings` button position
V 23   settingButtonPosition: SettingButtonPositionEnum.AUTO,
24
41d790 25   // Permission mode
8ad127 26   permissionMode: PermissionModeEnum.ROLE,
26b610 27
V 28   // Permission-related cache is stored in sessionStorage or localStorage
fedd9c 29   permissionCacheType: CacheTypeEnum.LOCAL,
41d790 30
V 31   // color
32   themeColor: primaryColor,
33
34   // Website gray mode, open for possible mourning dates
35   grayMode: false,
36
37   // Color Weakness Mode
38   colorWeak: false,
39
40   // Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems
41   fullContent: false,
42
43   // content mode
44   contentMode: ContentEnum.FULL,
45
46   // Whether to display the logo
47   showLogo: true,
48
49   // Whether to show footer
ebf7c8 50   showFooter: false,
737b1b 51
41d790 52   // Header configuration
2f6253 53   headerSetting: {
0692b4 54     // header bg color
82c318 55     bgColor: HEADER_PRESET_BG_COLOR_LIST[0],
41d790 56     // Fixed at the top
2f6253 57     fixed: true,
41d790 58     // Whether to show top
2f6253 59     show: true,
60     // theme
46e087 61     theme: ThemeEnum.LIGHT,
41d790 62     // Whether to enable the lock screen function
710158 63     useLockPage: true,
41d790 64     // Whether to show the full screen button
2f6253 65     showFullScreen: true,
41d790 66     // Whether to show the document button
2f6253 67     showDoc: true,
41d790 68     // Whether to show the notification button
7a1e94 69     showNotice: true,
dddda5 70     // Whether to display the menu search
V 71     showSearch: true,
2f6253 72   },
ba068b 73
41d790 74   // Menu configuration
2f6253 75   menuSetting: {
0692b4 76     // sidebar menu bg color
82c318 77     bgColor: SIDE_BAR_BG_COLOR_LIST[0],
41d790 78     //  Whether to fix the left menu
0692b4 79     fixed: true,
41d790 80     // Menu collapse
2f6253 81     collapsed: false,
f69aae 82     // Whether to display the menu name when folding the menu
V 83     collapsedShowTitle: false,
41d790 84     // Whether it can be dragged
V 85     // Only limited to the opening of the left menu, the mouse has a drag bar on the right side of the menu
31ff05 86     canDrag: false,
41d790 87     // Whether to show no dom
2f6253 88     show: true,
41d790 89     // Whether to show dom
c774a6 90     hidden: false,
41d790 91     // Menu width
2b95be 92     menuWidth: 210,
41d790 93     // Menu mode
2f6253 94     mode: MenuModeEnum.INLINE,
41d790 95     // Menu type
2f6253 96     type: MenuTypeEnum.SIDEBAR,
41d790 97     // Menu theme
46e087 98     theme: ThemeEnum.DARK,
41d790 99     // Split menu
2f6253 100     split: false,
41d790 101     // Top menu layout
770283 102     topMenuAlign: 'center',
41d790 103     // Fold trigger position
4f6b65 104     trigger: TriggerEnum.HEADER,
41d790 105     // Turn on accordion mode, only show a menu
4ff6b7 106     accordion: true,
e6db0d 107     // Switch page to close menu
V 108     closeMixSidebarOnChange: false,
0419a0 109     // Module opening method ‘click’ |'hover'
e821f4 110     mixSideTrigger: MixSidebarTriggerEnum.CLICK,
97180e 111     // Fixed expanded menu
V 112     mixSideFixed: false,
2f6253 113   },
737b1b 114
41d790 115   // Multi-label
2f6253 116   multiTabsSetting: {
967b28 117     cache: false,
41d790 118     // Turn on
2f6253 119     show: true,
cedba3 120     // Is it possible to drag and drop sorting tabs
V 121     canDrag: true,
41d790 122     // Turn on quick actions
2f6253 123     showQuick: true,
a65ad9 124     // Whether to show the refresh button
V 125     showRedo: true,
0e7c57 126     // Whether to show the collapse button
V 127     showFold: true,
2f6253 128   },
ba068b 129
41d790 130   // Transition Setting
V 131   transitionSetting: {
132     //  Whether to open the page switching animation
133     // The disabled state will also disable pageLoadinng
134     enable: true,
135
136     // Route basic switching animation
137     basicTransition: RouterTransitionEnum.FADE_SIDE,
138
139     // Whether to open page switching loading
140     // Only open when enable=true
141     openPageLoading: true,
142
143     // Whether to open the top progress bar
26b610 144     openNProgress: false,
41d790 145   },
V 146
147   // Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
2f6253 148   openKeepAlive: true,
149
41d790 150   // Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
2f6253 151   lockTime: 0,
ba068b 152
41d790 153   // Whether to show breadcrumbs
2f6253 154   showBreadCrumb: true,
ba068b 155
41d790 156   // Whether to show the breadcrumb icon
d8b25b 157   showBreadCrumbIcon: false,
2f6253 158
41d790 159   // Use error-handler-plugin
27c6f6 160   useErrorHandle: false,
2f6253 161
41d790 162   // Whether to open back to top
2f6253 163   useOpenBackTop: true,
164
41d790 165   //  Is it possible to embed iframe pages
2f6253 166   canEmbedIFramePage: true,
e83cb0 167
41d790 168   // Whether to delete unclosed messages and notify when switching the interface
e83cb0 169   closeMessageOnSwitch: true,
N 170
41d790 171   // Whether to cancel the http request that has been sent but not responded when switching the interface.
V 172   // If it is enabled, I want to overwrite a single interface. Can be set in a separate interface
99ac30 173   removeAllHttpPending: false,
2f6253 174 };
175
176 export default setting;