global.d.ts 830 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. interface Window {
  2. existLoading: boolean
  3. lazy: NodeJS.Timer
  4. unique: number
  5. tokenRefreshing: boolean
  6. requests: Function[]
  7. eventSource: EventSource
  8. }
  9. interface InputData {
  10. // 标题
  11. title?: string
  12. // 内容,比如radio的选项列表数据 content: { a: '选项1', b: '选项2' }
  13. content?: any
  14. // 提示信息
  15. tip?: string
  16. // 需要生成子级元素时,子级元素属性(比如radio)
  17. childrenAttr?: anyObj
  18. // 城市选择器等级,1=省,2=市,3=区
  19. level?: number
  20. }
  21. interface anyObj {
  22. [key: string]: any
  23. }
  24. interface TableDefaultData<T = any> {
  25. list: T
  26. remark: string
  27. total: number
  28. }
  29. interface ApiResponse<T = any> {
  30. code: number
  31. data: T
  32. msg: string
  33. time: number
  34. }
  35. interface ApiPromise<T = any> extends Promise<ApiResponse<T>> {}