config.d.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. // 代码逻辑说明: 【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
  25. isThemeBright: boolean;
  26. topMenuAlign: 'start' | 'center' | 'end';
  27. trigger: TriggerEnum;
  28. accordion: boolean;
  29. closeMixSidebarOnChange: boolean;
  30. collapsedShowTitle: boolean;
  31. mixSideTrigger: MixSidebarTriggerEnum;
  32. mixSideFixed: boolean;
  33. }
  34. export interface MultiTabsSetting {
  35. cache: boolean;
  36. show: boolean;
  37. showQuick: boolean;
  38. canDrag: boolean;
  39. showRedo: boolean;
  40. showFold: boolean;
  41. theme: string;
  42. }
  43. export interface HeaderSetting {
  44. bgColor: string;
  45. fixed: boolean;
  46. show: boolean;
  47. theme: ThemeEnum;
  48. // 是否显示全屏按钮
  49. showFullScreen: boolean;
  50. // 是否显示锁屏按钮
  51. useLockPage: boolean;
  52. // 是否显示文档连接
  53. showDoc: boolean;
  54. // 是否显示消息图标
  55. showNotice: boolean;
  56. // 是否显示搜索按钮
  57. showSearch: boolean;
  58. }
  59. export interface LocaleSetting {
  60. // 是否显示国际化切换按钮
  61. showPicker: boolean;
  62. // Current language
  63. locale: LocaleType;
  64. // default language
  65. fallback: LocaleType;
  66. // available Locales
  67. availableLocales: LocaleType[];
  68. }
  69. export interface TransitionSetting {
  70. // Whether to open the page switching animation
  71. enable: boolean;
  72. // Route basic switching animation
  73. basicTransition: RouterTransitionEnum;
  74. // Whether to open page switching loading
  75. openPageLoading: boolean;
  76. // Whether to open the top progress bar
  77. openNProgress: boolean;
  78. }
  79. export interface ProjectConfig {
  80. // Storage location of permission related information
  81. permissionCacheType: CacheTypeEnum;
  82. // Whether to show the configuration button
  83. showSettingButton: boolean;
  84. // Whether to show the theme switch button
  85. showDarkModeToggle: boolean;
  86. // Configure where the button is displayed
  87. settingButtonPosition: SettingButtonPositionEnum;
  88. // Permission mode
  89. permissionMode: PermissionModeEnum;
  90. // Session timeout processing
  91. sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
  92. // Website gray mode, open for possible mourning dates
  93. grayMode: boolean;
  94. // Whether to turn on the color weak mode
  95. colorWeak: boolean;
  96. // Theme color
  97. themeColor: string;
  98. // Theme Mode
  99. themeMode: string;
  100. // The main interface is displayed in full screen, the menu is not displayed, and the top
  101. fullContent: boolean;
  102. // content width
  103. contentMode: ContentEnum;
  104. // Whether to display the logo
  105. showLogo: boolean;
  106. // Whether to show the global footer
  107. showFooter: boolean;
  108. // menuType: MenuTypeEnum;
  109. headerSetting: HeaderSetting;
  110. // menuSetting
  111. menuSetting: MenuSetting;
  112. // Multi-tab settings
  113. multiTabsSetting: MultiTabsSetting;
  114. // Animation configuration
  115. transitionSetting: TransitionSetting;
  116. // pageLayout whether to enable keep-alive
  117. openKeepAlive: boolean;
  118. // Lock screen time
  119. lockTime: number;
  120. // Show breadcrumbs
  121. showBreadCrumb: boolean;
  122. // Show breadcrumb icon
  123. showBreadCrumbIcon: boolean;
  124. // Use error-handler-plugin
  125. useErrorHandle: boolean;
  126. // Whether to open back to top
  127. useOpenBackTop: boolean;
  128. // Is it possible to embed iframe pages
  129. canEmbedIFramePage: boolean;
  130. // Whether to delete unclosed messages and notify when switching the interface
  131. closeMessageOnSwitch: boolean;
  132. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  133. removeAllHttpPending: boolean;
  134. aiIconShow: 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. // 使用新任务弹窗
  156. useNewTaskModal: boolean;
  157. // 当前是否运行在 electron 平台
  158. isElectronPlatform: boolean;
  159. // 【JEECG作为乾坤子应用】是否以乾坤子应用模式启动
  160. isQiankunMicro: boolean;
  161. // 【JEECG作为乾坤子应用】乾坤子应用入口
  162. qiankunMicroAppEntry?: string;
  163. }
  164. export interface GlobEnvConfig {
  165. // Site title
  166. VITE_GLOB_APP_TITLE: string;
  167. // Service interface url
  168. VITE_GLOB_API_URL: string;
  169. VITE_USE_MOCK: string;
  170. // Service interface url prefix
  171. VITE_GLOB_API_URL_PREFIX?: string;
  172. // Project abbreviation
  173. VITE_GLOB_APP_SHORT_NAME: string;
  174. //是否开启单点登录
  175. VITE_GLOB_APP_OPEN_SSO: string;
  176. //是否开启微应用模式
  177. VITE_GLOB_APP_OPEN_QIANKUN: string;
  178. //单点服务端地址
  179. VITE_GLOB_APP_CAS_BASE_URL: string;
  180. VITE_GLOB_DOMAIN_URL: string;
  181. // Upload url
  182. VITE_GLOB_UPLOAD_URL?: string;
  183. // view url
  184. VITE_GLOB_ONLINE_VIEW_URL?: string;
  185. // 全局隐藏哪些布局,多个用逗号隔开
  186. VITE_GLOB_HIDE_LAYOUT_TYPES?: string;
  187. // 【JEECG作为乾坤子应用】填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致
  188. VITE_GLOB_QIANKUN_MICRO_APP_NAME?: string;
  189. // 【JEECG作为乾坤子应用】作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致
  190. VITE_GLOB_QIANKUN_MICRO_APP_ENTRY?: string;
  191. //在线文档编辑版本。可选属性:wps, onlyoffice
  192. VITE_GLOB_ONLINE_DOCUMENT_VERSION?: string;
  193. // 当前运行在什么平台
  194. VITE_GLOB_RUN_PLATFORM?: 'web' | 'electron';
  195. }