projectSetting.ts 4.8 KB

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