global.d.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. import type { ComponentInternalInstance as ComponentInstance, PropType as VuePropType } from 'vue/runtime-core';
  2. import { LanguageEnum } from '@/enums/LanguageEnum';
  3. declare global {
  4. /** vue Instance */
  5. declare type ComponentInternalInstance = ComponentInstance;
  6. /**vue */
  7. declare type PropType<T> = VuePropType<T>;
  8. /**
  9. * 界面字段隐藏属性
  10. */
  11. declare interface FieldOption {
  12. key: number;
  13. label: string;
  14. visible: boolean;
  15. children?: Array<FieldOption>;
  16. }
  17. /**
  18. * 弹窗属性
  19. */
  20. declare interface DialogOption {
  21. /**
  22. * 弹窗标题
  23. */
  24. title?: string;
  25. /**
  26. * 是否显示
  27. */
  28. visible: boolean;
  29. }
  30. declare interface UploadOption {
  31. /** 设置上传的请求头部 */
  32. headers: { [key: string]: any };
  33. /** 上传的地址 */
  34. url: string;
  35. }
  36. /**
  37. * 导入属性
  38. */
  39. declare interface ImportOption extends UploadOption {
  40. /** 是否显示弹出层 */
  41. open: boolean;
  42. /** 弹出层标题 */
  43. title: string;
  44. /** 是否禁用上传 */
  45. isUploading: boolean;
  46. updateSupport: number;
  47. /** 其他参数 */
  48. [key: string]: any;
  49. }
  50. /**
  51. * 字典数据 数据配置
  52. */
  53. declare interface DictDataOption {
  54. label: string;
  55. value: string;
  56. elTagType?: ElTagType;
  57. elTagClass?: string;
  58. }
  59. declare interface BaseEntity {
  60. createBy?: any;
  61. createDept?: any;
  62. createTime?: string;
  63. updateBy?: any;
  64. updateTime?: any;
  65. }
  66. /**
  67. * 分页数据
  68. * T : 表单数据
  69. * D : 查询参数
  70. */
  71. declare interface PageData<T, D> {
  72. form: T;
  73. queryParams: D;
  74. rules: ElFormRules;
  75. }
  76. /**
  77. * 分页查询参数
  78. */
  79. declare interface PageQuery {
  80. pageNum: number;
  81. pageSize: number;
  82. }
  83. declare interface LayoutSetting {
  84. /**
  85. * 是否显示顶部导航
  86. */
  87. topNav: boolean;
  88. /**
  89. * 是否显示多标签导航
  90. */
  91. tagsView: boolean;
  92. /**
  93. * 是否固定头部
  94. */
  95. fixedHeader: boolean;
  96. /**
  97. * 是否显示侧边栏Logo
  98. */
  99. sidebarLogo: boolean;
  100. /**
  101. * 是否显示动态标题
  102. */
  103. dynamicTitle: boolean;
  104. /**
  105. * 侧边栏主题 theme-dark | theme-light
  106. */
  107. sideTheme: string;
  108. /**
  109. * 主题模式
  110. */
  111. theme: string;
  112. }
  113. declare interface DefaultSettings extends LayoutSetting {
  114. /**
  115. * 网页标题
  116. */
  117. title: string;
  118. /**
  119. * 是否显示系统布局设置
  120. */
  121. showSettings: boolean;
  122. /**
  123. * 导航栏布局
  124. */
  125. layout: string;
  126. /**
  127. * 布局大小
  128. */
  129. size: 'large' | 'default' | 'small';
  130. /**
  131. * 语言
  132. */
  133. language: LanguageEnum;
  134. /**
  135. * 是否启用动画效果
  136. */
  137. animationEnable: boolean;
  138. /**
  139. * 是否启用暗黑模式
  140. *
  141. * true:暗黑模式
  142. * false: 明亮模式
  143. */
  144. dark: boolean;
  145. errorLog: string;
  146. }
  147. }
  148. export {};