interface.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. function uploadProps() {
  2. return {
  3. capture: [Boolean, String],
  4. type: String,
  5. name: String,
  6. defaultFileList: Array,
  7. fileList: Array,
  8. action: [String, Function],
  9. directory: {
  10. type: Boolean,
  11. default: undefined
  12. },
  13. data: [Object, Function],
  14. method: String,
  15. headers: Object,
  16. showUploadList: {
  17. type: [Boolean, Object],
  18. default: undefined
  19. },
  20. multiple: {
  21. type: Boolean,
  22. default: undefined
  23. },
  24. accept: String,
  25. beforeUpload: Function,
  26. onChange: Function,
  27. 'onUpdate:fileList': Function,
  28. onDrop: Function,
  29. listType: String,
  30. onPreview: Function,
  31. onDownload: Function,
  32. onReject: Function,
  33. onRemove: Function,
  34. /** @deprecated Please use `onRemove` directly */
  35. remove: Function,
  36. supportServerRender: {
  37. type: Boolean,
  38. default: undefined
  39. },
  40. disabled: {
  41. type: Boolean,
  42. default: undefined
  43. },
  44. prefixCls: String,
  45. customRequest: Function,
  46. withCredentials: {
  47. type: Boolean,
  48. default: undefined
  49. },
  50. openFileDialogOnClick: {
  51. type: Boolean,
  52. default: undefined
  53. },
  54. locale: {
  55. type: Object,
  56. default: undefined
  57. },
  58. id: String,
  59. previewFile: Function,
  60. /** @deprecated Please use `beforeUpload` directly */
  61. transformFile: Function,
  62. iconRender: Function,
  63. isImageUrl: Function,
  64. progress: Object,
  65. itemRender: Function,
  66. /** Config max count of `fileList`. Will replace current one when `maxCount` is 1 */
  67. maxCount: Number,
  68. height: [Number, String],
  69. removeIcon: Function,
  70. downloadIcon: Function,
  71. previewIcon: Function
  72. };
  73. }
  74. function uploadListProps() {
  75. return {
  76. listType: String,
  77. onPreview: Function,
  78. onDownload: Function,
  79. onRemove: Function,
  80. items: Array,
  81. progress: Object,
  82. prefixCls: String,
  83. showRemoveIcon: {
  84. type: Boolean,
  85. default: undefined
  86. },
  87. showDownloadIcon: {
  88. type: Boolean,
  89. default: undefined
  90. },
  91. showPreviewIcon: {
  92. type: Boolean,
  93. default: undefined
  94. },
  95. removeIcon: Function,
  96. downloadIcon: Function,
  97. previewIcon: Function,
  98. locale: {
  99. type: Object,
  100. default: undefined
  101. },
  102. previewFile: Function,
  103. iconRender: Function,
  104. isImageUrl: Function,
  105. appendAction: Function,
  106. appendActionVisible: {
  107. type: Boolean,
  108. default: undefined
  109. },
  110. itemRender: Function
  111. };
  112. }
  113. export { uploadProps, uploadListProps };