config.d.ts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. // Theme Mode
  100. themeMode: string;
  101. // The main interface is displayed in full screen, the menu is not displayed, and the top
  102. fullContent: boolean;
  103. // content width
  104. contentMode: ContentEnum;
  105. // Whether to display the logo
  106. showLogo: boolean;
  107. // Whether to show the global footer
  108. showFooter: boolean;
  109. // menuType: MenuTypeEnum;
  110. headerSetting: HeaderSetting;
  111. // menuSetting
  112. menuSetting: MenuSetting;
  113. // Multi-tab settings
  114. multiTabsSetting: MultiTabsSetting;
  115. // Animation configuration
  116. transitionSetting: TransitionSetting;
  117. // pageLayout whether to enable keep-alive
  118. openKeepAlive: boolean;
  119. // Lock screen time
  120. lockTime: number;
  121. // Show breadcrumbs
  122. showBreadCrumb: boolean;
  123. // Show breadcrumb icon
  124. showBreadCrumbIcon: boolean;
  125. // Use error-handler-plugin
  126. useErrorHandle: boolean;
  127. // Whether to open back to top
  128. useOpenBackTop: boolean;
  129. // Is it possible to embed iframe pages
  130. canEmbedIFramePage: boolean;
  131. // Whether to delete unclosed messages and notify when switching the interface
  132. closeMessageOnSwitch: boolean;
  133. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  134. removeAllHttpPending: boolean;
  135. }
  136. export interface GlobConfig {
  137. // Site title
  138. title: string;
  139. // Service interface url
  140. apiUrl: string;
  141. domainUrl: string;
  142. // Upload url (作废)
  143. uploadUrl?: string;
  144. openSso?: string;
  145. openQianKun?: string;
  146. casBaseUrl?: string;
  147. // onlineview url
  148. viewUrl?: string;
  149. // Service interface url prefix
  150. urlPrefix?: string;
  151. // Project abbreviation
  152. shortName: string;
  153. // 短标题
  154. shortTitle: string;
  155. // 【JEECG作为乾坤子应用】是否以乾坤子应用模式启动
  156. isQiankunMicro: boolean;
  157. // 【JEECG作为乾坤子应用】乾坤子应用入口
  158. qiankunMicroAppEntry?: string;
  159. }
  160. export interface GlobEnvConfig {
  161. // Site title
  162. VITE_GLOB_APP_TITLE: string;
  163. // Service interface url
  164. VITE_GLOB_API_URL: string;
  165. VITE_USE_MOCK: string;
  166. // Service interface url prefix
  167. VITE_GLOB_API_URL_PREFIX?: string;
  168. // Project abbreviation
  169. VITE_GLOB_APP_SHORT_NAME: string;
  170. //是否开启单点登录
  171. VITE_GLOB_APP_OPEN_SSO: string;
  172. //是否开启微应用模式
  173. VITE_GLOB_APP_OPEN_QIANKUN: string;
  174. //单点服务端地址
  175. VITE_GLOB_APP_CAS_BASE_URL: string;
  176. VITE_GLOB_DOMAIN_URL: string;
  177. // Upload url
  178. VITE_GLOB_UPLOAD_URL?: string;
  179. // view url
  180. VITE_GLOB_ONLINE_VIEW_URL?: string;
  181. // 全局隐藏哪些布局,多个用逗号隔开
  182. VITE_GLOB_HIDE_LAYOUT_TYPES?: string;
  183. // 【JEECG作为乾坤子应用】填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致
  184. VITE_GLOB_QIANKUN_MICRO_APP_NAME?: string;
  185. // 【JEECG作为乾坤子应用】作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致
  186. VITE_GLOB_QIANKUN_MICRO_APP_ENTRY?: string;
  187. }