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