projectSetting.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. import type { ProjectConfig } from '/@/types/config';
  2. import { MenuTypeEnum, MenuModeEnum, TriggerEnum } 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: true,
  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: 'click',
  98. },
  99. // Multi-label
  100. multiTabsSetting: {
  101. // Turn on
  102. show: true,
  103. // Is it possible to drag and drop sorting tabs
  104. canDrag: true,
  105. // Turn on quick actions
  106. showQuick: true,
  107. // Whether to show the refresh button
  108. showRedo: true,
  109. },
  110. // Transition Setting
  111. transitionSetting: {
  112. // Whether to open the page switching animation
  113. // The disabled state will also disable pageLoadinng
  114. enable: true,
  115. // Route basic switching animation
  116. basicTransition: RouterTransitionEnum.FADE_SIDE,
  117. // Whether to open page switching loading
  118. // Only open when enable=true
  119. openPageLoading: true,
  120. // Whether to open the top progress bar
  121. openNProgress: false,
  122. },
  123. // Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
  124. openKeepAlive: true,
  125. // Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
  126. lockTime: 0,
  127. // Whether to show breadcrumbs
  128. showBreadCrumb: true,
  129. // Whether to show the breadcrumb icon
  130. showBreadCrumbIcon: false,
  131. // Use error-handler-plugin
  132. useErrorHandle: isProdMode(),
  133. // Whether to open back to top
  134. useOpenBackTop: true,
  135. // Is it possible to embed iframe pages
  136. canEmbedIFramePage: true,
  137. // Whether to delete unclosed messages and notify when switching the interface
  138. closeMessageOnSwitch: true,
  139. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  140. // If it is enabled, I want to overwrite a single interface. Can be set in a separate interface
  141. removeAllHttpPending: true,
  142. };
  143. export default setting;