config.d.ts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. canDrag: boolean;
  17. show: boolean;
  18. hidden: boolean;
  19. split: boolean;
  20. menuWidth: number;
  21. mode: MenuModeEnum;
  22. type: MenuTypeEnum;
  23. theme: ThemeEnum;
  24. // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
  25. isThemeBright: boolean;
  26. // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
  27. topMenuAlign: 'start' | 'center' | 'end';
  28. trigger: TriggerEnum;
  29. accordion: boolean;
  30. closeMixSidebarOnChange: boolean;
  31. collapsedShowTitle: boolean;
  32. mixSideTrigger: MixSidebarTriggerEnum;
  33. mixSideFixed: boolean;
  34. }
  35. export interface MultiTabsSetting {
  36. cache: boolean;
  37. show: boolean;
  38. showQuick: boolean;
  39. canDrag: boolean;
  40. showRedo: boolean;
  41. showFold: boolean;
  42. theme: string;
  43. }
  44. export interface HeaderSetting {
  45. bgColor: string;
  46. fixed: boolean;
  47. show: boolean;
  48. theme: ThemeEnum;
  49. // 是否显示全屏按钮
  50. showFullScreen: boolean;
  51. // 是否显示锁屏按钮
  52. useLockPage: boolean;
  53. // 是否显示文档连接
  54. showDoc: boolean;
  55. // 是否显示消息图标
  56. showNotice: boolean;
  57. // 是否显示搜索按钮
  58. showSearch: boolean;
  59. }
  60. export interface LocaleSetting {
  61. // 是否显示国际化切换按钮
  62. showPicker: boolean;
  63. // Current language
  64. locale: LocaleType;
  65. // default language
  66. fallback: LocaleType;
  67. // available Locales
  68. availableLocales: LocaleType[];
  69. }
  70. export interface TransitionSetting {
  71. // Whether to open the page switching animation
  72. enable: boolean;
  73. // Route basic switching animation
  74. basicTransition: RouterTransitionEnum;
  75. // Whether to open page switching loading
  76. openPageLoading: boolean;
  77. // Whether to open the top progress bar
  78. openNProgress: boolean;
  79. }
  80. export interface ProjectConfig {
  81. // Storage location of permission related information
  82. permissionCacheType: CacheTypeEnum;
  83. // Whether to show the configuration button
  84. showSettingButton: boolean;
  85. // Whether to show the theme switch button
  86. showDarkModeToggle: boolean;
  87. // Configure where the button is displayed
  88. settingButtonPosition: SettingButtonPositionEnum;
  89. // Permission mode
  90. permissionMode: PermissionModeEnum;
  91. // Session timeout processing
  92. sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
  93. // Website gray mode, open for possible mourning dates
  94. grayMode: boolean;
  95. // Whether to turn on the color weak mode
  96. colorWeak: boolean;
  97. // Theme color
  98. themeColor: string;
  99. // The main interface is displayed in full screen, the menu is not displayed, and the top
  100. fullContent: boolean;
  101. // content width
  102. contentMode: ContentEnum;
  103. // Whether to display the logo
  104. showLogo: boolean;
  105. // Whether to show the global footer
  106. showFooter: boolean;
  107. // menuType: MenuTypeEnum;
  108. headerSetting: HeaderSetting;
  109. // menuSetting
  110. menuSetting: MenuSetting;
  111. // Multi-tab settings
  112. multiTabsSetting: MultiTabsSetting;
  113. // Animation configuration
  114. transitionSetting: TransitionSetting;
  115. // pageLayout whether to enable keep-alive
  116. openKeepAlive: boolean;
  117. // Lock screen time
  118. lockTime: number;
  119. // Show breadcrumbs
  120. showBreadCrumb: boolean;
  121. // Show breadcrumb icon
  122. showBreadCrumbIcon: boolean;
  123. // Use error-handler-plugin
  124. useErrorHandle: boolean;
  125. // Whether to open back to top
  126. useOpenBackTop: boolean;
  127. // Is it possible to embed iframe pages
  128. canEmbedIFramePage: boolean;
  129. // Whether to delete unclosed messages and notify when switching the interface
  130. closeMessageOnSwitch: boolean;
  131. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  132. removeAllHttpPending: boolean;
  133. }
  134. export interface GlobConfig {
  135. // Site title
  136. title: string;
  137. // Service interface url
  138. apiUrl: string;
  139. domainUrl: string;
  140. // Upload url (作废)
  141. uploadUrl?: string;
  142. openSso?: string;
  143. openQianKun?: string;
  144. casBaseUrl?: string;
  145. // onlineview url
  146. viewUrl?: string;
  147. // Service interface url prefix
  148. urlPrefix?: string;
  149. // Project abbreviation
  150. shortName: string;
  151. // 短标题
  152. shortTitle: string;
  153. }
  154. export interface GlobEnvConfig {
  155. // Site title
  156. VITE_GLOB_APP_TITLE: string;
  157. // Service interface url
  158. VITE_GLOB_API_URL: string;
  159. VITE_USE_MOCK: string;
  160. // Service interface url prefix
  161. VITE_GLOB_API_URL_PREFIX?: string;
  162. // Project abbreviation
  163. VITE_GLOB_APP_SHORT_NAME: string;
  164. //是否开启单点登录
  165. VITE_GLOB_APP_OPEN_SSO: string;
  166. //是否开启微应用模式
  167. VITE_GLOB_APP_OPEN_QIANKUN: string;
  168. //单点服务端地址
  169. VITE_GLOB_APP_CAS_BASE_URL: string;
  170. VITE_GLOB_DOMAIN_URL: string;
  171. // Upload url
  172. VITE_GLOB_UPLOAD_URL?: string;
  173. // view url
  174. VITE_GLOB_ONLINE_VIEW_URL?: string;
  175. }