projectSetting.ts 5.0 KB

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