global.d.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. import type { PropType as VuePropType, ComponentInternalInstance as ComponentInstance } from 'vue';
  2. import { LanguageEnum } from '@/enums/LanguageEnum';
  3. declare global {
  4. /** vue Instance */
  5. declare type ComponentInternalInstance = ComponentInstance;
  6. /**
  7. * 界面字段隐藏属性
  8. */
  9. declare interface FieldOption {
  10. key: number;
  11. label: string;
  12. visible: boolean;
  13. children?: Array<FieldOption>;
  14. }
  15. /**
  16. * 弹窗属性
  17. */
  18. declare interface DialogOption {
  19. /**
  20. * 弹窗标题
  21. */
  22. title?: string;
  23. /**
  24. * 是否显示
  25. */
  26. visible: boolean;
  27. }
  28. declare interface UploadOption {
  29. /** 设置上传的请求头部 */
  30. headers: { [key: string]: any };
  31. /** 上传的地址 */
  32. url: string;
  33. }
  34. /**
  35. * 导入属性
  36. */
  37. declare interface ImportOption extends UploadOption {
  38. /** 是否显示弹出层 */
  39. open: boolean;
  40. /** 弹出层标题 */
  41. title: string;
  42. /** 是否禁用上传 */
  43. isUploading: boolean;
  44. updateSupport: number;
  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. declare interface LayoutSetting {
  82. /**
  83. * 是否显示顶部导航
  84. */
  85. topNav: boolean;
  86. /**
  87. * 是否显示多标签导航
  88. */
  89. tagsView: boolean;
  90. /**
  91. * 是否固定头部
  92. */
  93. fixedHeader: boolean;
  94. /**
  95. * 是否显示侧边栏Logo
  96. */
  97. sidebarLogo: boolean;
  98. /**
  99. * 是否显示动态标题
  100. */
  101. dynamicTitle: boolean;
  102. /**
  103. * 侧边栏主题 theme-dark | theme-light
  104. */
  105. sideTheme: string;
  106. /**
  107. * 主题模式
  108. */
  109. theme: string;
  110. }
  111. declare interface DefaultSettings extends LayoutSetting {
  112. /**
  113. * 网页标题
  114. */
  115. title: string;
  116. /**
  117. * 是否显示系统布局设置
  118. */
  119. showSettings: boolean;
  120. /**
  121. * 导航栏布局
  122. */
  123. layout: string;
  124. /**
  125. * 布局大小
  126. */
  127. size: 'large' | 'default' | 'small';
  128. /**
  129. * 语言
  130. */
  131. language: LanguageEnum;
  132. /**
  133. * 是否启用动画效果
  134. */
  135. animationEnable: boolean;
  136. /**
  137. * 是否启用暗黑模式
  138. *
  139. * true:暗黑模式
  140. * false: 明亮模式
  141. */
  142. dark: boolean;
  143. errorLog: string;
  144. }
  145. }
  146. export {};