luchanan
2023-10-23 00bf5d5bbf4dccaa0556f8df3041b0ef3beadf50
src/settings/projectSetting.ts
@@ -1,26 +1,40 @@
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, themeMode } from '../../build/config/themeConfig';
import {
  ContentEnum,
  PermissionModeEnum,
  ThemeEnum,
  RouterTransitionEnum,
  SettingButtonPositionEnum,
  SessionTimeoutProcessingEnum,
} from '/@/enums/appEnum';
import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting';
const primaryColor = '#0960bd';
// ! 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,
  permissionMode: PermissionModeEnum.ROUTE_MAPPING,
  // Permission-related cache is stored in sessionStorage or localStorage
  permissionCacheType: CacheTypeEnum.LOCAL,
  // Session timeout processing
  sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP,
  // color
  // TODO Theme color
  themeColor: primaryColor,
  // TODO dark theme
  themeMode: themeMode,
  // Website gray mode, open for possible mourning dates
  grayMode: false,
@@ -40,21 +54,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
@@ -63,7 +66,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
@@ -72,16 +74,19 @@
    showNotice: true,
    // Whether to display the menu search
    showSearch: true,
    showApi: true,
  },
  // Menu configuration
  menuSetting: {
    // sidebar menu bg color
    bgColor: '#001529',
    bgColor: SIDE_BAR_BG_COLOR_LIST[0],
    //  Whether to fix the left menu
    fixed: true,
    // Menu collapse
    collapsed: false,
    // When sider hide because of the responsive layout
    siderHidden: false,
    // Whether to display the menu name when folding the menu
    collapsedShowTitle: false,
    // Whether it can be dragged
@@ -117,13 +122,13 @@
  // Multi-label
  multiTabsSetting: {
    cache: false,
    // Turn on
    show: true,
    // Is it possible to drag and drop sorting tabs
    canDrag: true,
    // Turn on quick actions
    showQuick: true,
    // Whether to show the refresh button
    showRedo: true,
    // Whether to show the collapse button
@@ -133,7 +138,7 @@
  // Transition Setting
  transitionSetting: {
    //  Whether to open the page switching animation
    // The disabled state will also disable pageLoadinng
    // The disabled state will also disable pageLoading
    enable: true,
    // Route basic switching animation