configure.js 803 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { basicInputConfigureOptions } from '../../input-configure-options'
  2. import { fileTypeList } from './upload'
  3. export default {
  4. ...basicInputConfigureOptions(),
  5. limit: {
  6. type: 'number',
  7. label: '文件数量限制',
  8. min: 0
  9. },
  10. size: {
  11. type: 'number',
  12. label: '文件大小限制(MB)',
  13. controlsPosition: 'right',
  14. defaultValue: 500,
  15. max: 500
  16. },
  17. fileType: {
  18. type: 'select',
  19. multiple: true,
  20. label: '文件类型',
  21. options: fileTypeList
  22. },
  23. formwork: {
  24. label: '模板',
  25. type: 'file',
  26. limit: 1,
  27. dependOn: ['fileType'],
  28. changeConfig: (config, { fileType }) => {
  29. if (fileType) config.fileType = fileType
  30. return config
  31. },
  32. fileType: fileTypeList.join(',')
  33. },
  34. required: { },
  35. requiredErrorMessage: { }
  36. }