Vben
2021-04-10 215d8bab380728164d7fe2958c2d2d1151fce892
src/settings/projectSetting.ts
@@ -1,15 +1,26 @@
import type { ProjectConfig } from '/@/types/config';
import type { ProjectConfig } from '/#/config';
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
import { CacheTypeEnum } from '/@/enums/cacheEnum';
import { ContentEnum, PermissionModeEnum, ThemeEnum, RouterTransitionEnum } from '/@/enums/appEnum';
import { primaryColor } from '../../build/config/lessModifyVars';
import { isProdMode } from '/@/utils/env';
import {
  ContentEnum,
  PermissionModeEnum,
  ThemeEnum,
  RouterTransitionEnum,
  SettingButtonPositionEnum,
} from '/@/enums/appEnum';
import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting';
import { primaryColor } from '../../build/config/themeConfig';
// ! You need to clear the browser cache after the change
const setting: ProjectConfig = {
  // Whether to show the configuration button
  showSettingButton: true,
  // Whether to show the theme switch button
  showDarkModeToggle: true,
  // `Settings` button position
  settingButtonPosition: SettingButtonPositionEnum.AUTO,
  // Permission mode
  permissionMode: PermissionModeEnum.ROLE,
@@ -18,7 +29,6 @@
  permissionCacheType: CacheTypeEnum.LOCAL,
  // color
  // TODO Theme color
  themeColor: primaryColor,
  // Website gray mode, open for possible mourning dates
@@ -39,21 +49,10 @@
  // Whether to show footer
  showFooter: false,
  // locale setting
  locale: {
    show: true,
    // Locale
    lang: 'zh_CN',
    // Default locale
    fallback: 'zh_CN',
    // available Locales
    availableLocales: ['zh_CN', 'en'],
  },
  // Header configuration
  headerSetting: {
    // header bg color
    bgColor: '#ffffff',
    bgColor: HEADER_PRESET_BG_COLOR_LIST[0],
    // Fixed at the top
    fixed: true,
    // Whether to show top
@@ -62,7 +61,6 @@
    theme: ThemeEnum.LIGHT,
    // Whether to enable the lock screen function
    useLockPage: true,
    // Whether to show the full screen button
    showFullScreen: true,
    // Whether to show the document button
@@ -76,7 +74,7 @@
  // Menu configuration
  menuSetting: {
    // sidebar menu bg color
    bgColor: '#273352',
    bgColor: SIDE_BAR_BG_COLOR_LIST[0],
    //  Whether to fix the left menu
    fixed: true,
    // Menu collapse
@@ -85,7 +83,7 @@
    collapsedShowTitle: false,
    // 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
    canDrag: true,
    canDrag: false,
    // Whether to show no dom
    show: true,
    // Whether to show dom
@@ -110,6 +108,8 @@
    closeMixSidebarOnChange: false,
    // Module opening method ‘click’ |'hover'
    mixSideTrigger: MixSidebarTriggerEnum.CLICK,
    // Fixed expanded menu
    mixSideFixed: false,
  },
  // Multi-label
@@ -123,6 +123,8 @@
    // Whether to show the refresh button
    showRedo: true,
    // Whether to show the collapse button
    showFold: true,
  },
  // Transition Setting
@@ -155,7 +157,7 @@
  showBreadCrumbIcon: false,
  // Use error-handler-plugin
  useErrorHandle: isProdMode(),
  useErrorHandle: false,
  // Whether to open back to top
  useOpenBackTop: true,
@@ -168,7 +170,7 @@
  // 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
  removeAllHttpPending: true,
  removeAllHttpPending: false,
};
export default setting;