projectSetting.ts 5.0 KB

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