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.

160 lines
4.1 KiB

  1. import type {
  2. VNode,
  3. FunctionalComponent,
  4. PropType as VuePropType,
  5. ComponentPublicInstance
  6. } from "vue";
  7. import type { ECharts } from "echarts";
  8. import type { IconifyIcon } from "@iconify/vue";
  9. import type { TableColumns } from "@pureadmin/table";
  10. /**
  11. * `.vue` `.ts` `.tsx` 使
  12. */
  13. declare global {
  14. /**
  15. *
  16. */
  17. const __APP_INFO__: {
  18. pkg: {
  19. name: string;
  20. version: string;
  21. dependencies: Recordable<string>;
  22. devDependencies: Recordable<string>;
  23. };
  24. lastBuildTime: string;
  25. };
  26. /**
  27. * Window
  28. */
  29. interface Window {
  30. // Global vue app instance
  31. __APP__: App<Element>;
  32. webkitCancelAnimationFrame: (handle: number) => void;
  33. mozCancelAnimationFrame: (handle: number) => void;
  34. oCancelAnimationFrame: (handle: number) => void;
  35. msCancelAnimationFrame: (handle: number) => void;
  36. webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  37. mozRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  38. oRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  39. msRequestAnimationFrame: (callback: FrameRequestCallback) => number;
  40. }
  41. /**
  42. *
  43. */
  44. type ViteCompression =
  45. | "none"
  46. | "gzip"
  47. | "brotli"
  48. | "both"
  49. | "gzip-clear"
  50. | "brotli-clear"
  51. | "both-clear";
  52. /**
  53. *
  54. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#%E5%85%B7%E4%BD%93%E9%85%8D%E7%BD%AE}
  55. */
  56. interface ViteEnv {
  57. VITE_PORT: number;
  58. VITE_PUBLIC_PATH: string;
  59. VITE_ROUTER_HISTORY: string;
  60. VITE_CDN: boolean;
  61. VITE_HIDE_HOME: string;
  62. VITE_COMPRESSION: ViteCompression;
  63. }
  64. /**
  65. * `@pureadmin/table` `TableColumns` 便
  66. */
  67. interface TableColumnList extends Array<TableColumns> {}
  68. /**
  69. * `public/serverConfig.json`
  70. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#serverconfig-json}
  71. */
  72. interface ServerConfigs {
  73. Version?: string;
  74. Title?: string;
  75. FixedHeader?: boolean;
  76. HiddenSideBar?: boolean;
  77. MultiTagsCache?: boolean;
  78. KeepAlive?: boolean;
  79. Locale?: string;
  80. Layout?: string;
  81. Theme?: string;
  82. DarkMode?: boolean;
  83. Grey?: boolean;
  84. Weak?: boolean;
  85. HideTabs?: boolean;
  86. SidebarStatus?: boolean;
  87. EpThemeColor?: string;
  88. ShowLogo?: boolean;
  89. ShowModel?: string;
  90. MenuArrowIconNoTransition?: boolean;
  91. CachingAsyncRoutes?: boolean;
  92. TooltipEffect?: Effect;
  93. ResponsiveStorageNameSpace?: string;
  94. }
  95. /**
  96. * `ServerConfigs`
  97. * @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/config/#serverconfig-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. sidebarStatus?: boolean;
  114. epThemeColor?: string;
  115. showLogo?: boolean;
  116. showModel?: string;
  117. username?: string;
  118. }
  119. /**
  120. * `responsive-storage` `storage`
  121. */
  122. interface ResponsiveStorage {
  123. locale: {
  124. locale?: string;
  125. };
  126. layout: {
  127. layout?: string;
  128. theme?: string;
  129. darkMode?: boolean;
  130. sidebarStatus?: boolean;
  131. epThemeColor?: string;
  132. };
  133. configure: {
  134. grey?: boolean;
  135. weak?: boolean;
  136. hideTabs?: boolean;
  137. showLogo?: boolean;
  138. showModel?: string;
  139. multiTagsCache?: boolean;
  140. };
  141. tags?: Array<any>;
  142. }
  143. /**
  144. * 访
  145. */
  146. interface GlobalPropertiesApi {
  147. $echarts: ECharts;
  148. $storage: ResponsiveStorage;
  149. $config: ServerConfigs;
  150. }
  151. }