projectSetting.ts 4.3 KB

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