合同小程序后台管理系统前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
5.6 KiB

2 months ago
  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. // 【JEECG作为乾坤子应用】是否以乾坤子应用模式启动
  154. isQiankunMicro: boolean;
  155. // 【JEECG作为乾坤子应用】乾坤子应用入口
  156. qiankunMicroAppEntry?: string;
  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_OPEN_QIANKUN: string;
  172. //单点服务端地址
  173. VITE_GLOB_APP_CAS_BASE_URL: string;
  174. VITE_GLOB_DOMAIN_URL: string;
  175. // Upload url
  176. VITE_GLOB_UPLOAD_URL?: string;
  177. // view url
  178. VITE_GLOB_ONLINE_VIEW_URL?: string;
  179. // 【JEECG作为乾坤子应用】填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致
  180. VITE_GLOB_QIANKUN_MICRO_APP_NAME?: string;
  181. // 【JEECG作为乾坤子应用】作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致
  182. VITE_GLOB_QIANKUN_MICRO_APP_ENTRY?: string;
  183. }