projectSetting.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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: true,
  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 refresh button
  53. showRedo: true,
  54. // Whether to show the full screen button
  55. showFullScreen: true,
  56. // Whether to show the document button
  57. showDoc: true,
  58. // Whether to show the notification button
  59. showNotice: true,
  60. // Whether to display the menu search
  61. showSearch: true,
  62. },
  63. // Menu configuration
  64. menuSetting: {
  65. // sidebar menu bg color
  66. bgColor: '#273352',
  67. // Whether to fix the left menu
  68. fixed: true,
  69. // Menu collapse
  70. collapsed: false,
  71. // Whether to display the menu name when folding the menu
  72. collapsedShowTitle: false,
  73. // Whether it can be dragged
  74. // Only limited to the opening of the left menu, the mouse has a drag bar on the right side of the menu
  75. canDrag: false,
  76. // Whether to show no dom
  77. show: true,
  78. // Whether to show dom
  79. hidden: true,
  80. // Menu width
  81. menuWidth: 210,
  82. // Menu mode
  83. mode: MenuModeEnum.INLINE,
  84. // Menu type
  85. type: MenuTypeEnum.SIDEBAR,
  86. // Menu theme
  87. theme: ThemeEnum.DARK,
  88. // Split menu
  89. split: false,
  90. // Top menu layout
  91. topMenuAlign: 'center',
  92. // Fold trigger position
  93. trigger: TriggerEnum.HEADER,
  94. // Turn on accordion mode, only show a menu
  95. accordion: true,
  96. },
  97. // Multi-label
  98. multiTabsSetting: {
  99. // Turn on
  100. show: true,
  101. // Is it possible to drag and drop sorting tabs
  102. canDrag: true,
  103. // Turn on quick actions
  104. showQuick: true,
  105. },
  106. // Transition Setting
  107. transitionSetting: {
  108. // Whether to open the page switching animation
  109. // The disabled state will also disable pageLoadinng
  110. enable: true,
  111. // Route basic switching animation
  112. basicTransition: RouterTransitionEnum.FADE_SIDE,
  113. // Whether to open page switching loading
  114. // Only open when enable=true
  115. openPageLoading: true,
  116. // Whether to open the top progress bar
  117. openNProgress: false,
  118. },
  119. // Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
  120. openKeepAlive: true,
  121. // Automatic screen lock time, 0 does not lock the screen. Unit minute default 0
  122. lockTime: 0,
  123. // Whether to show breadcrumbs
  124. showBreadCrumb: true,
  125. // Whether to show the breadcrumb icon
  126. showBreadCrumbIcon: false,
  127. // Use error-handler-plugin
  128. useErrorHandle: isProdMode(),
  129. // Whether to open back to top
  130. useOpenBackTop: true,
  131. // Is it possible to embed iframe pages
  132. canEmbedIFramePage: true,
  133. // Whether to delete unclosed messages and notify when switching the interface
  134. closeMessageOnSwitch: true,
  135. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  136. // If it is enabled, I want to overwrite a single interface. Can be set in a separate interface
  137. removeAllHttpPending: true,
  138. };
  139. export default setting;