config.d.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum'
  2. import {
  3. ContentEnum,
  4. PermissionModeEnum,
  5. ThemeEnum,
  6. RouterTransitionEnum,
  7. SettingButtonPositionEnum,
  8. SessionTimeoutProcessingEnum,
  9. } from '/@/enums/appEnum'
  10. import { CacheTypeEnum } from '/@/enums/cacheEnum'
  11. export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko'
  12. export interface MenuSetting {
  13. bgColor: string
  14. fixed: boolean
  15. collapsed: boolean
  16. siderHidden: boolean
  17. canDrag: boolean
  18. show: boolean
  19. hidden: boolean
  20. split: boolean
  21. menuWidth: number
  22. mode: MenuModeEnum
  23. type: MenuTypeEnum
  24. theme: ThemeEnum
  25. topMenuAlign: 'start' | 'center' | 'end'
  26. trigger: TriggerEnum
  27. accordion: boolean
  28. closeMixSidebarOnChange: boolean
  29. collapsedShowTitle: boolean
  30. mixSideTrigger: MixSidebarTriggerEnum
  31. mixSideFixed: boolean
  32. }
  33. export interface MultiTabsSetting {
  34. cache: boolean
  35. show: boolean
  36. showQuick: boolean
  37. canDrag: boolean
  38. showRedo: boolean
  39. showFold: boolean
  40. }
  41. export interface HeaderSetting {
  42. bgColor: string
  43. fixed: boolean
  44. show: boolean
  45. theme: ThemeEnum
  46. // Turn on full screen
  47. showFullScreen: boolean
  48. // Show document button
  49. showDoc: boolean
  50. // Show message center button
  51. showNotice: boolean
  52. showSearch: boolean
  53. }
  54. export interface LocaleSetting {
  55. showPicker: boolean
  56. // Current language
  57. locale: LocaleType
  58. // default language
  59. fallback: LocaleType
  60. // available Locales
  61. availableLocales: LocaleType[]
  62. }
  63. export interface TransitionSetting {
  64. // Whether to open the page switching animation
  65. enable: boolean
  66. // Route basic switching animation
  67. basicTransition: RouterTransitionEnum
  68. // Whether to open page switching loading
  69. openPageLoading: boolean
  70. // Whether to open the top progress bar
  71. openNProgress: boolean
  72. }
  73. export interface ProjectConfig {
  74. // Storage location of permission related information
  75. permissionCacheType: CacheTypeEnum
  76. // Whether to show the configuration button
  77. showSettingButton: boolean
  78. // Whether to show the theme switch button
  79. showDarkModeToggle: boolean
  80. // Configure where the button is displayed
  81. settingButtonPosition: SettingButtonPositionEnum
  82. // Permission mode
  83. permissionMode: PermissionModeEnum
  84. // Session timeout processing
  85. sessionTimeoutProcessing: SessionTimeoutProcessingEnum
  86. // Website gray mode, open for possible mourning dates
  87. grayMode: boolean
  88. // Whether to turn on the color weak mode
  89. colorWeak: boolean
  90. // Theme color
  91. themeColor: string
  92. // The main interface is displayed in full screen, the menu is not displayed, and the top
  93. fullContent: boolean
  94. // content width
  95. contentMode: ContentEnum
  96. // Whether to display the logo
  97. showLogo: boolean
  98. // Whether to show the global footer
  99. showFooter: boolean
  100. // menuType: MenuTypeEnum;
  101. headerSetting: HeaderSetting
  102. // menuSetting
  103. menuSetting: MenuSetting
  104. // Multi-tab settings
  105. multiTabsSetting: MultiTabsSetting
  106. // Animation configuration
  107. transitionSetting: TransitionSetting
  108. // pageLayout whether to enable keep-alive
  109. openKeepAlive: boolean
  110. // Show breadcrumbs
  111. showBreadCrumb: boolean
  112. // Show breadcrumb icon
  113. showBreadCrumbIcon: boolean
  114. // Use error-handler-plugin
  115. useErrorHandle: boolean
  116. // Whether to open back to top
  117. useOpenBackTop: boolean
  118. // Is it possible to embed iframe pages
  119. canEmbedIFramePage: boolean
  120. // Whether to delete unclosed messages and notify when switching the interface
  121. closeMessageOnSwitch: boolean
  122. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  123. removeAllHttpPending: boolean
  124. }
  125. export interface GlobConfig {
  126. // Site title
  127. title: string
  128. // Service interface url
  129. apiUrl: string
  130. // Upload url
  131. uploadUrl?: string
  132. // Service interface url prefix
  133. urlPrefix?: string
  134. // Project abbreviation
  135. shortName: string
  136. }
  137. export interface GlobEnvConfig {
  138. // Site title
  139. VITE_GLOB_APP_TITLE: string
  140. // Service interface url
  141. VITE_GLOB_API_URL: string
  142. // Service interface url prefix
  143. VITE_GLOB_API_URL_PREFIX?: string
  144. // Project abbreviation
  145. VITE_GLOB_APP_SHORT_NAME: string
  146. // Upload url
  147. VITE_GLOB_UPLOAD_URL?: string
  148. }