projectSetting.ts 4.8 KB

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