global-components.d.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import type { IconifyIcon } from "@iconify/types";
  2. import type { iconType } from "../src/components/ReIcon/src/types";
  3. import type { Component, DefineComponent, HTMLAttributes } from "vue";
  4. type IconifyIconOfflineProps = {
  5. icon?: IconifyIcon | string | Component;
  6. } & iconType &
  7. HTMLAttributes;
  8. type IconifyIconOnlineProps = {
  9. icon?: string;
  10. } & iconType &
  11. HTMLAttributes;
  12. type FontIconProps = {
  13. icon?: string;
  14. /** `unicode` 引用模式 */
  15. uni?: boolean;
  16. /** `svg symbol` 引用模式 */
  17. svg?: boolean;
  18. iconType?: "uni" | "svg";
  19. } & HTMLAttributes;
  20. /** 权限控制组件公共 `Props` */
  21. type AuthorityProps = {
  22. value?: string | string[];
  23. };
  24. declare module "vue" {
  25. /**
  26. * 自定义全局组件获得 `Volar` 提示
  27. */
  28. export interface GlobalComponents {
  29. IconifyIconOffline: DefineComponent<IconifyIconOfflineProps>;
  30. IconifyIconOnline: DefineComponent<IconifyIconOnlineProps>;
  31. FontIcon: DefineComponent<FontIconProps>;
  32. Auth: DefineComponent<AuthorityProps>;
  33. Perms: DefineComponent<AuthorityProps>;
  34. }
  35. }
  36. export {};