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.

181 lines
4.6 KiB

  1. import type { ECharts } from "echarts";
  2. import type { TableColumns } from "@pureadmin/table";
  3. /**
  4. * `.vue` `.ts` `.tsx` 使
  5. */
  6. declare global {
  7. /**
  8. * `node``pnpm`
  9. */
  10. const __APP_INFO__: {
  11. pkg: {
  12. name: string;
  13. version: string;
  14. engines: {
  15. node: string;
  16. pnpm: string;
  17. };
  18. dependencies: Recordable<string>;
  19. devDependencies: Recordable<string>;
  20. };
  21. lastBuildTime: string;
  22. };
  23. /**
  24. * Window
  25. */
  26. interface Window {
  27. // Global vue app instance
  28. __APP__: App<Element>;
  29. webkitCancelAnimationFrame: (handle: number) => void;
  30. mozCancelAnimationFrame: (handle: number) => void;
  31. oCancelAnimationFrame: (handle: number) => void;
  32. msCancelAnimationFrame: (handle: number) => void;
  33. webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  34. mozRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  35. oRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  36. msRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  37. }
  38. /**
  39. *
  40. */
  41. type ViteCompression =
  42. | "none"
  43. | "gzip"
  44. | "brotli"
  45. | "both"
  46. | "gzip-clear"
  47. | "brotli-clear"
  48. | "both-clear";
  49. /**
  50. *
  51. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#%E5%85%B7%E4%BD%93%E9%85%8D%E7%BD%AE}
  52. */
  53. interface ViteEnv {
  54. VITE_PORT: number;
  55. VITE_PUBLIC_PATH: string;
  56. VITE_ROUTER_HISTORY: string;
  57. VITE_CDN: boolean;
  58. VITE_HIDE_HOME: string;
  59. VITE_COMPRESSION: ViteCompression;
  60. }
  61. /**
  62. * `@pureadmin/table` `TableColumns` 便
  63. */
  64. interface TableColumnList extends Array<TableColumns> {}
  65. /**
  66. * `public/platform-config.json`
  67. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#platform-config-json}
  68. */
  69. interface PlatformConfigs {
  70. Version?: string;
  71. Title?: string;
  72. FixedHeader?: boolean;
  73. HiddenSideBar?: boolean;
  74. MultiTagsCache?: boolean;
  75. KeepAlive?: boolean;
  76. Locale?: string;
  77. Layout?: string;
  78. Theme?: string;
  79. DarkMode?: boolean;
  80. OverallStyle?: string;
  81. Grey?: boolean;
  82. Weak?: boolean;
  83. HideTabs?: boolean;
  84. HideFooter?: boolean;
  85. SidebarStatus?: boolean;
  86. EpThemeColor?: string;
  87. ShowLogo?: boolean;
  88. ShowModel?: string;
  89. MenuArrowIconNoTransition?: boolean;
  90. CachingAsyncRoutes?: boolean;
  91. TooltipEffect?: Effect;
  92. ResponsiveStorageNameSpace?: string;
  93. MenuSearchHistory?: number;
  94. }
  95. /**
  96. * `PlatformConfigs`
  97. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#platform-config-json}
  98. */
  99. interface StorageConfigs {
  100. version?: string;
  101. title?: string;
  102. fixedHeader?: boolean;
  103. hiddenSideBar?: boolean;
  104. multiTagsCache?: boolean;
  105. keepAlive?: boolean;
  106. locale?: string;
  107. layout?: string;
  108. theme?: string;
  109. darkMode?: boolean;
  110. grey?: boolean;
  111. weak?: boolean;
  112. hideTabs?: boolean;
  113. hideFooter?: boolean;
  114. sidebarStatus?: boolean;
  115. epThemeColor?: string;
  116. themeColor?: string;
  117. overallStyle?: string;
  118. showLogo?: boolean;
  119. showModel?: string;
  120. menuSearchHistory?: number;
  121. username?: string;
  122. }
  123. /**
  124. * `responsive-storage` `storage`
  125. */
  126. interface ResponsiveStorage {
  127. locale: {
  128. locale?: string;
  129. };
  130. layout: {
  131. layout?: string;
  132. theme?: string;
  133. darkMode?: boolean;
  134. sidebarStatus?: boolean;
  135. epThemeColor?: string;
  136. themeColor?: string;
  137. overallStyle?: string;
  138. };
  139. configure: {
  140. grey?: boolean;
  141. weak?: boolean;
  142. hideTabs?: boolean;
  143. hideFooter?: boolean;
  144. showLogo?: boolean;
  145. showModel?: string;
  146. multiTagsCache?: boolean;
  147. };
  148. tags?: Array<any>;
  149. }
  150. /**
  151. * 访
  152. */
  153. interface GlobalPropertiesApi {
  154. $echarts: ECharts;
  155. $storage: ResponsiveStorage;
  156. $config: PlatformConfigs;
  157. }
  158. /**
  159. * `Element`
  160. */
  161. interface Element {
  162. // v-ripple 作用于 src/directives/ripple/index.ts 文件
  163. _ripple?: {
  164. enabled?: boolean;
  165. centered?: boolean;
  166. class?: string;
  167. circle?: boolean;
  168. touched?: boolean;
  169. };
  170. }
  171. }