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.

193 lines
4.9 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. * Document
  40. */
  41. interface Document {
  42. webkitFullscreenElement?: Element;
  43. mozFullScreenElement?: Element;
  44. msFullscreenElement?: Element;
  45. }
  46. /**
  47. *
  48. */
  49. type ViteCompression =
  50. | "none"
  51. | "gzip"
  52. | "brotli"
  53. | "both"
  54. | "gzip-clear"
  55. | "brotli-clear"
  56. | "both-clear";
  57. /**
  58. *
  59. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#%E5%85%B7%E4%BD%93%E9%85%8D%E7%BD%AE}
  60. */
  61. interface ViteEnv {
  62. VITE_PORT: number;
  63. VITE_PUBLIC_PATH: string;
  64. VITE_ROUTER_HISTORY: string;
  65. VITE_CDN: boolean;
  66. VITE_HIDE_HOME: string;
  67. VITE_COMPRESSION: ViteCompression;
  68. }
  69. /**
  70. * `@pureadmin/table` `TableColumns` 便
  71. */
  72. interface TableColumnList extends Array<TableColumns> {}
  73. /**
  74. * `public/platform-config.json`
  75. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#platform-config-json}
  76. */
  77. interface PlatformConfigs {
  78. Version?: string;
  79. Title?: string;
  80. FixedHeader?: boolean;
  81. HiddenSideBar?: boolean;
  82. MultiTagsCache?: boolean;
  83. MaxTagsLevel?: number;
  84. KeepAlive?: boolean;
  85. Locale?: string;
  86. Layout?: string;
  87. Theme?: string;
  88. DarkMode?: boolean;
  89. OverallStyle?: string;
  90. Grey?: boolean;
  91. Weak?: boolean;
  92. HideTabs?: boolean;
  93. HideFooter?: boolean;
  94. Stretch?: boolean | number;
  95. SidebarStatus?: boolean;
  96. EpThemeColor?: string;
  97. ShowLogo?: boolean;
  98. ShowModel?: string;
  99. MenuArrowIconNoTransition?: boolean;
  100. CachingAsyncRoutes?: boolean;
  101. TooltipEffect?: Effect;
  102. ResponsiveStorageNameSpace?: string;
  103. MenuSearchHistory?: number;
  104. }
  105. /**
  106. * `PlatformConfigs`
  107. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#platform-config-json}
  108. */
  109. interface StorageConfigs {
  110. version?: string;
  111. title?: string;
  112. fixedHeader?: boolean;
  113. hiddenSideBar?: boolean;
  114. multiTagsCache?: boolean;
  115. keepAlive?: boolean;
  116. locale?: string;
  117. layout?: string;
  118. theme?: string;
  119. darkMode?: boolean;
  120. grey?: boolean;
  121. weak?: boolean;
  122. hideTabs?: boolean;
  123. hideFooter?: boolean;
  124. sidebarStatus?: boolean;
  125. epThemeColor?: string;
  126. themeColor?: string;
  127. overallStyle?: string;
  128. showLogo?: boolean;
  129. showModel?: string;
  130. menuSearchHistory?: number;
  131. username?: string;
  132. }
  133. /**
  134. * `responsive-storage` `storage`
  135. */
  136. interface ResponsiveStorage {
  137. locale: {
  138. locale?: string;
  139. };
  140. layout: {
  141. layout?: string;
  142. theme?: string;
  143. darkMode?: boolean;
  144. sidebarStatus?: boolean;
  145. epThemeColor?: string;
  146. themeColor?: string;
  147. overallStyle?: string;
  148. };
  149. configure: {
  150. grey?: boolean;
  151. weak?: boolean;
  152. hideTabs?: boolean;
  153. hideFooter?: boolean;
  154. showLogo?: boolean;
  155. showModel?: string;
  156. multiTagsCache?: boolean;
  157. stretch?: boolean | number;
  158. };
  159. tags?: Array<any>;
  160. }
  161. /**
  162. * 访
  163. */
  164. interface GlobalPropertiesApi {
  165. $echarts: ECharts;
  166. $storage: ResponsiveStorage;
  167. $config: PlatformConfigs;
  168. }
  169. /**
  170. * `Element`
  171. */
  172. interface Element {
  173. // v-ripple 作用于 src/directives/ripple/index.ts 文件
  174. _ripple?: {
  175. enabled?: boolean;
  176. centered?: boolean;
  177. class?: string;
  178. circle?: boolean;
  179. touched?: boolean;
  180. };
  181. }
  182. }