2021-02-26 20:09:24 +08:00
|
|
|
|
import type { ProjectConfig } from '/#/config';
|
2021-01-02 22:16:46 +08:00
|
|
|
|
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
|
2020-11-25 21:26:10 +08:00
|
|
|
|
import { CacheTypeEnum } from '/@/enums/cacheEnum';
|
2021-02-18 21:02:56 +08:00
|
|
|
|
import {
|
|
|
|
|
|
ContentEnum,
|
|
|
|
|
|
PermissionModeEnum,
|
|
|
|
|
|
ThemeEnum,
|
|
|
|
|
|
RouterTransitionEnum,
|
|
|
|
|
|
SettingButtonPositionEnum,
|
|
|
|
|
|
} from '/@/enums/appEnum';
|
2021-03-17 21:08:46 +08:00
|
|
|
|
import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting';
|
2021-02-03 23:52:55 +08:00
|
|
|
|
import { primaryColor, themeMode } from '../../build/config/themeConfig';
|
2020-11-08 23:13:47 +08:00
|
|
|
|
|
2020-11-03 22:26:26 +08:00
|
|
|
|
// ! You need to clear the browser cache after the change
|
2020-09-28 20:19:10 +08:00
|
|
|
|
const setting: ProjectConfig = {
|
|
|
|
|
|
// Whether to show the configuration button
|
|
|
|
|
|
showSettingButton: true,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2021-02-18 21:02:56 +08:00
|
|
|
|
// `Settings` button position
|
|
|
|
|
|
settingButtonPosition: SettingButtonPositionEnum.AUTO,
|
|
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Permission mode
|
2021-03-23 22:31:23 +08:00
|
|
|
|
permissionMode: PermissionModeEnum.BACK,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 21:26:10 +08:00
|
|
|
|
// Permission-related cache is stored in sessionStorage or localStorage
|
2021-03-23 00:21:09 +08:00
|
|
|
|
permissionCacheType: CacheTypeEnum.LOCAL,
|
2020-11-25 21:26:10 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// color
|
|
|
|
|
|
themeColor: primaryColor,
|
2021-02-27 23:08:12 +08:00
|
|
|
|
|
2021-02-03 23:52:55 +08:00
|
|
|
|
// TODO dark theme
|
|
|
|
|
|
themeMode: themeMode,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
|
|
|
|
|
|
// Website gray mode, open for possible mourning dates
|
2020-09-28 20:19:10 +08:00
|
|
|
|
grayMode: false,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Color Weakness Mode
|
2020-09-28 20:19:10 +08:00
|
|
|
|
colorWeak: false,
|
2020-11-11 22:13:59 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems
|
2020-09-28 20:19:10 +08:00
|
|
|
|
fullContent: false,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-09-28 20:19:10 +08:00
|
|
|
|
// content mode
|
|
|
|
|
|
contentMode: ContentEnum.FULL,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to display the logo
|
2020-09-28 20:19:10 +08:00
|
|
|
|
showLogo: true,
|
|
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show footer
|
2020-12-28 00:16:17 +08:00
|
|
|
|
showFooter: false,
|
2020-11-24 22:59:29 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Header configuration
|
2020-09-28 20:19:10 +08:00
|
|
|
|
headerSetting: {
|
2020-11-24 22:59:29 +08:00
|
|
|
|
// header bg color
|
2021-03-17 21:08:46 +08:00
|
|
|
|
bgColor: HEADER_PRESET_BG_COLOR_LIST[0],
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Fixed at the top
|
2020-09-28 20:19:10 +08:00
|
|
|
|
fixed: true,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show top
|
2020-09-28 20:19:10 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
// theme
|
2020-11-18 22:41:59 +08:00
|
|
|
|
theme: ThemeEnum.LIGHT,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to enable the lock screen function
|
2020-10-18 21:55:21 +08:00
|
|
|
|
useLockPage: true,
|
2020-12-15 00:13:23 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show the full screen button
|
2020-09-28 20:19:10 +08:00
|
|
|
|
showFullScreen: true,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show the document button
|
2020-09-28 20:19:10 +08:00
|
|
|
|
showDoc: true,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show the notification button
|
2020-10-21 21:15:06 +08:00
|
|
|
|
showNotice: true,
|
2020-12-10 23:58:11 +08:00
|
|
|
|
// Whether to display the menu search
|
|
|
|
|
|
showSearch: true,
|
2020-09-28 20:19:10 +08:00
|
|
|
|
},
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Menu configuration
|
2020-09-28 20:19:10 +08:00
|
|
|
|
menuSetting: {
|
2020-11-24 22:59:29 +08:00
|
|
|
|
// sidebar menu bg color
|
2021-03-17 21:08:46 +08:00
|
|
|
|
bgColor: SIDE_BAR_BG_COLOR_LIST[0],
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to fix the left menu
|
2020-11-24 22:59:29 +08:00
|
|
|
|
fixed: true,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Menu collapse
|
2020-09-28 20:19:10 +08:00
|
|
|
|
collapsed: false,
|
2020-12-22 23:18:50 +08:00
|
|
|
|
// Whether to display the menu name when folding the menu
|
|
|
|
|
|
collapsedShowTitle: false,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// 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
|
2021-01-05 21:45:05 +08:00
|
|
|
|
canDrag: false,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show no dom
|
2020-09-28 20:19:10 +08:00
|
|
|
|
show: true,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show dom
|
2020-12-15 14:59:22 +08:00
|
|
|
|
hidden: false,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Menu width
|
2020-11-11 23:49:13 +08:00
|
|
|
|
menuWidth: 210,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Menu mode
|
2020-09-28 20:19:10 +08:00
|
|
|
|
mode: MenuModeEnum.INLINE,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Menu type
|
2020-09-28 20:19:10 +08:00
|
|
|
|
type: MenuTypeEnum.SIDEBAR,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Menu theme
|
2020-11-18 22:41:59 +08:00
|
|
|
|
theme: ThemeEnum.DARK,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Split menu
|
2020-09-28 20:19:10 +08:00
|
|
|
|
split: false,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Top menu layout
|
2020-10-31 19:51:24 +08:00
|
|
|
|
topMenuAlign: 'center',
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Fold trigger position
|
2020-11-06 22:41:00 +08:00
|
|
|
|
trigger: TriggerEnum.HEADER,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Turn on accordion mode, only show a menu
|
2020-11-10 22:45:39 +08:00
|
|
|
|
accordion: true,
|
2020-12-21 23:38:16 +08:00
|
|
|
|
// Switch page to close menu
|
|
|
|
|
|
closeMixSidebarOnChange: false,
|
2021-01-01 23:03:40 +08:00
|
|
|
|
// Module opening method ‘click’ |'hover'
|
2021-01-02 22:16:46 +08:00
|
|
|
|
mixSideTrigger: MixSidebarTriggerEnum.CLICK,
|
2021-01-03 10:42:19 +08:00
|
|
|
|
// Fixed expanded menu
|
|
|
|
|
|
mixSideFixed: false,
|
2020-09-28 20:19:10 +08:00
|
|
|
|
},
|
2020-11-23 00:35:15 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Multi-label
|
2020-09-28 20:19:10 +08:00
|
|
|
|
multiTabsSetting: {
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Turn on
|
2020-09-28 20:19:10 +08:00
|
|
|
|
show: true,
|
2020-11-25 22:28:58 +08:00
|
|
|
|
// Is it possible to drag and drop sorting tabs
|
|
|
|
|
|
canDrag: true,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Turn on quick actions
|
2020-09-28 20:19:10 +08:00
|
|
|
|
showQuick: true,
|
2020-12-15 00:13:23 +08:00
|
|
|
|
|
|
|
|
|
|
// Whether to show the refresh button
|
|
|
|
|
|
showRedo: true,
|
2021-01-06 20:10:16 +08:00
|
|
|
|
// Whether to show the collapse button
|
|
|
|
|
|
showFold: true,
|
2020-09-28 20:19:10 +08:00
|
|
|
|
},
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// 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
|
2020-11-25 21:26:10 +08:00
|
|
|
|
openNProgress: false,
|
2020-11-25 00:43:33 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
|
2020-09-28 20:19:10 +08:00
|
|
|
|
openKeepAlive: true,
|
|
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
|
2020-09-28 20:19:10 +08:00
|
|
|
|
lockTime: 0,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show breadcrumbs
|
2020-09-28 20:19:10 +08:00
|
|
|
|
showBreadCrumb: true,
|
2020-11-23 23:24:13 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to show the breadcrumb icon
|
2020-10-22 21:37:15 +08:00
|
|
|
|
showBreadCrumbIcon: false,
|
2020-09-28 20:19:10 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Use error-handler-plugin
|
2021-02-16 10:59:25 +08:00
|
|
|
|
useErrorHandle: false,
|
2020-09-28 20:19:10 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to open back to top
|
2020-09-28 20:19:10 +08:00
|
|
|
|
useOpenBackTop: true,
|
|
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Is it possible to embed iframe pages
|
2020-09-28 20:19:10 +08:00
|
|
|
|
canEmbedIFramePage: true,
|
2020-10-13 01:40:18 +08:00
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// Whether to delete unclosed messages and notify when switching the interface
|
2020-10-13 01:40:18 +08:00
|
|
|
|
closeMessageOnSwitch: true,
|
|
|
|
|
|
|
2020-11-25 00:43:33 +08:00
|
|
|
|
// 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
|
2021-01-09 23:28:52 +08:00
|
|
|
|
removeAllHttpPending: false,
|
2020-09-28 20:19:10 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default setting;
|