index.d.ts 881 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { Component } from '@/router/types'
  2. // import { ConfigType } from '@/packages/index.d'
  3. export type ConfigType = {
  4. key: string
  5. title: string
  6. category: string
  7. categoryName: string
  8. package: string
  9. chartData: {
  10. chartSize: {
  11. w: number
  12. h: number
  13. }
  14. }
  15. node: Component
  16. image: string | (() => Promise<typeof import('*.png')>)
  17. [T: string]: unknown
  18. }
  19. export enum PackagesCategoryEnum {
  20. CHARTS = 'Charts',
  21. TABLES = 'Tables',
  22. INFORMATION = 'Informations',
  23. DECORATES = 'Decorates'
  24. }
  25. export enum PackagesCategoryName {
  26. CHARTS = '图表',
  27. TABLES = '表格',
  28. INFORMATION = '信息',
  29. DECORATES = '小组件'
  30. }
  31. export type PackagesType = {
  32. [PackagesCategoryEnum.CHARTS]: ConfigType[]
  33. [PackagesCategoryEnum.INFORMATION]: ConfigType[]
  34. [PackagesCategoryEnum.TABLES]: ConfigType[]
  35. [PackagesCategoryEnum.DECORATES]: ConfigType[]
  36. }