config.d.ts 4.7 KB

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