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.

192 lines
4.8 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. KeepAlive?: boolean;
  84. Locale?: string;
  85. Layout?: string;
  86. Theme?: string;
  87. DarkMode?: boolean;
  88. OverallStyle?: string;
  89. Grey?: boolean;
  90. Weak?: boolean;
  91. HideTabs?: boolean;
  92. HideFooter?: boolean;
  93. Stretch?: boolean | number;
  94. SidebarStatus?: boolean;
  95. EpThemeColor?: string;
  96. ShowLogo?: boolean;
  97. ShowModel?: string;
  98. MenuArrowIconNoTransition?: boolean;
  99. CachingAsyncRoutes?: boolean;
  100. TooltipEffect?: Effect;
  101. ResponsiveStorageNameSpace?: string;
  102. MenuSearchHistory?: number;
  103. }
  104. /**
  105. * `PlatformConfigs`
  106. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#platform-config-json}
  107. */
  108. interface StorageConfigs {
  109. version?: string;
  110. title?: string;
  111. fixedHeader?: boolean;
  112. hiddenSideBar?: boolean;
  113. multiTagsCache?: boolean;
  114. keepAlive?: boolean;
  115. locale?: string;
  116. layout?: string;
  117. theme?: string;
  118. darkMode?: boolean;
  119. grey?: boolean;
  120. weak?: boolean;
  121. hideTabs?: boolean;
  122. hideFooter?: boolean;
  123. sidebarStatus?: boolean;
  124. epThemeColor?: string;
  125. themeColor?: string;
  126. overallStyle?: string;
  127. showLogo?: boolean;
  128. showModel?: string;
  129. menuSearchHistory?: number;
  130. username?: string;
  131. }
  132. /**
  133. * `responsive-storage` `storage`
  134. */
  135. interface ResponsiveStorage {
  136. locale: {
  137. locale?: string;
  138. };
  139. layout: {
  140. layout?: string;
  141. theme?: string;
  142. darkMode?: boolean;
  143. sidebarStatus?: boolean;
  144. epThemeColor?: string;
  145. themeColor?: string;
  146. overallStyle?: string;
  147. };
  148. configure: {
  149. grey?: boolean;
  150. weak?: boolean;
  151. hideTabs?: boolean;
  152. hideFooter?: boolean;
  153. showLogo?: boolean;
  154. showModel?: string;
  155. multiTagsCache?: boolean;
  156. stretch?: boolean | number;
  157. };
  158. tags?: Array<any>;
  159. }
  160. /**
  161. * 访
  162. */
  163. interface GlobalPropertiesApi {
  164. $echarts: ECharts;
  165. $storage: ResponsiveStorage;
  166. $config: PlatformConfigs;
  167. }
  168. /**
  169. * `Element`
  170. */
  171. interface Element {
  172. // v-ripple 作用于 src/directives/ripple/index.ts 文件
  173. _ripple?: {
  174. enabled?: boolean;
  175. centered?: boolean;
  176. class?: string;
  177. circle?: boolean;
  178. touched?: boolean;
  179. };
  180. }
  181. }