config.d.ts 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. showHeaderTime: boolean;
  60. }
  61. export interface LocaleSetting {
  62. // 是否显示国际化切换按钮
  63. showPicker: boolean;
  64. // Current language
  65. locale: LocaleType;
  66. // default language
  67. fallback: LocaleType;
  68. // available Locales
  69. availableLocales: LocaleType[];
  70. }
  71. export interface TransitionSetting {
  72. // Whether to open the page switching animation
  73. enable: boolean;
  74. // Route basic switching animation
  75. basicTransition: RouterTransitionEnum;
  76. // Whether to open page switching loading
  77. openPageLoading: boolean;
  78. // Whether to open the top progress bar
  79. openNProgress: boolean;
  80. }
  81. export interface ProjectConfig {
  82. // Storage location of permission related information
  83. permissionCacheType: CacheTypeEnum;
  84. // Whether to show the configuration button
  85. showSettingButton: boolean;
  86. // Whether to show the theme switch button
  87. showDarkModeToggle: boolean;
  88. // Configure where the button is displayed
  89. settingButtonPosition: SettingButtonPositionEnum;
  90. // Permission mode
  91. permissionMode: PermissionModeEnum;
  92. // Session timeout processing
  93. sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
  94. // Website gray mode, open for possible mourning dates
  95. grayMode: boolean;
  96. // Whether to turn on the color weak mode
  97. colorWeak: boolean;
  98. // Theme color
  99. themeColor: string;
  100. // Theme Mode
  101. themeMode: string;
  102. // The main interface is displayed in full screen, the menu is not displayed, and the top
  103. fullContent: boolean;
  104. // content width
  105. contentMode: ContentEnum;
  106. // Whether to display the logo
  107. showLogo: boolean;
  108. // Whether to show the global footer
  109. showFooter: boolean;
  110. // menuType: MenuTypeEnum;
  111. headerSetting: HeaderSetting;
  112. // menuSetting
  113. menuSetting: MenuSetting;
  114. // Multi-tab settings
  115. multiTabsSetting: MultiTabsSetting;
  116. // Animation configuration
  117. transitionSetting: TransitionSetting;
  118. // pageLayout whether to enable keep-alive
  119. openKeepAlive: boolean;
  120. // Lock screen time
  121. lockTime: number;
  122. // Show breadcrumbs
  123. showBreadCrumb: boolean;
  124. // Show breadcrumb icon
  125. showBreadCrumbIcon: boolean;
  126. // Use error-handler-plugin
  127. useErrorHandle: boolean;
  128. // Whether to open back to top
  129. useOpenBackTop: boolean;
  130. // Is it possible to embed iframe pages
  131. canEmbedIFramePage: boolean;
  132. // Whether to delete unclosed messages and notify when switching the interface
  133. closeMessageOnSwitch: boolean;
  134. // Whether to cancel the http request that has been sent but not responded when switching the interface.
  135. removeAllHttpPending: boolean;
  136. }
  137. export interface GlobConfig {
  138. // Site title
  139. title: string;
  140. // Service interface url
  141. apiUrl: string;
  142. domainUrl: string;
  143. // Upload url (作废)
  144. uploadUrl?: string;
  145. openSso?: 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. }
  158. export interface GlobEnvConfig {
  159. // Site title
  160. VITE_GLOB_APP_TITLE: string;
  161. // Service interface url
  162. VITE_GLOB_API_URL: string;
  163. VITE_USE_MOCK: string;
  164. // Service interface url prefix
  165. VITE_GLOB_API_URL_PREFIX?: string;
  166. // Project abbreviation
  167. VITE_GLOB_APP_SHORT_NAME: string;
  168. //是否开启单点登录
  169. VITE_GLOB_APP_OPEN_SSO: string;
  170. //单点服务端地址
  171. VITE_GLOB_APP_CAS_BASE_URL: string;
  172. VITE_GLOB_DOMAIN_URL: string;
  173. // Upload url
  174. VITE_GLOB_UPLOAD_URL?: string;
  175. // view url
  176. VITE_GLOB_ONLINE_VIEW_URL?: string;
  177. // 全局隐藏哪些布局,多个用逗号隔开
  178. VITE_GLOB_HIDE_LAYOUT_TYPES?: string;
  179. //在线文档编辑版本。可选属性:wps, onlyoffice
  180. VITE_GLOB_ONLINE_DOCUMENT_VERSION?: string;
  181. }