projectSetting.ts 5.2 KB

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