global.d.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import type { ComponentInternalInstance as ComponentInstance, PropType as VuePropType } from 'vue';
  2. declare global {
  3. /** vue Instance */
  4. declare type ComponentInternalInstance = ComponentInstance;
  5. /**vue */
  6. declare type PropType<T> = VuePropType<T>;
  7. /**
  8. * 界面字段隐藏属性
  9. */
  10. declare interface FieldOption {
  11. key: number;
  12. label: string;
  13. visible: boolean;
  14. children?: Array<FieldOption>;
  15. }
  16. /**
  17. * 弹窗属性
  18. */
  19. declare interface DialogOption {
  20. /**
  21. * 弹窗标题
  22. */
  23. title?: string;
  24. /**
  25. * 是否显示
  26. */
  27. visible: boolean;
  28. }
  29. declare interface UploadOption {
  30. /** 设置上传的请求头部 */
  31. headers: { [key: string]: any };
  32. /** 上传的地址 */
  33. url: string;
  34. }
  35. /**
  36. * 导入属性
  37. */
  38. declare interface ImportOption extends UploadOption {
  39. /** 是否显示弹出层 */
  40. open: boolean;
  41. /** 弹出层标题 */
  42. title: string;
  43. /** 是否禁用上传 */
  44. isUploading: boolean;
  45. /** 其他参数 */
  46. [key: string]: any;
  47. }
  48. /**
  49. * 字典数据 数据配置
  50. */
  51. declare interface DictDataOption {
  52. label: string;
  53. value: string;
  54. elTagType?: ElTagType;
  55. elTagClass?: string;
  56. }
  57. declare interface BaseEntity {
  58. createBy?: any;
  59. createDept?: any;
  60. createTime?: string;
  61. updateBy?: any;
  62. updateTime?: any;
  63. }
  64. /**
  65. * 分页数据
  66. * T : 表单数据
  67. * D : 查询参数
  68. */
  69. declare interface PageData<T, D> {
  70. form: T;
  71. queryParams: D;
  72. rules: ElFormRules;
  73. }
  74. /**
  75. * 分页查询参数
  76. */
  77. declare interface PageQuery {
  78. pageNum?: number;
  79. pageSize?: number;
  80. }
  81. }
  82. export {};