index.axml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <form-item
  2. className="{{ className }}"
  3. position="{{ position }}"
  4. label="{{ label }}"
  5. labelWidth="{{ labelWidth }}"
  6. status="{{ formData.status }}"
  7. errors="{{ formData.errors }}"
  8. tooltip="{{ tooltip }}"
  9. required="{{ formData.required }}"
  10. requiredMark="{{ requiredMark }}"
  11. validateStatus="{{ validateStatus }}"
  12. help="{{ help }}">
  13. <image-upload
  14. ref="handleRef"
  15. defaultFileList="{{ formData.value }}"
  16. maxCount="{{ maxCount }}"
  17. imageMode="{{ imageMode }}"
  18. sourceType="{{ sourceType }}"
  19. onChange="onChange"
  20. onUpload="{{ handleUpload ? handleUpload : 'handleUpload' }}"
  21. onRemove="{{ handleRemove ? handleRemove : 'handleRemove' }}"
  22. onPreview="onPreview"
  23. onBeforeUpload="{{ handleBeforeUpload ? handleBeforeUpload : 'handleBeforeUpload' }}"
  24. onChooseImageError="onChooseImageError" />
  25. <view
  26. a:if="{{ !tooltip }}"
  27. slot="tooltip">
  28. <slot name="tooltip" />
  29. </view>
  30. <view slot="extra">
  31. <slot name="extra">{{ extra }}</slot>
  32. </view>
  33. <view
  34. slot="header"
  35. slot-scope="item">
  36. <slot
  37. name="header"
  38. errors="{{ item.errors }}"
  39. status="{{ item.status }}" />
  40. </view>
  41. <view
  42. slot="footer"
  43. slot-scope="item">
  44. <slot
  45. name="footer"
  46. errors="{{ item.errors }}"
  47. status="{{ item.status }}" />
  48. </view>
  49. </form-item>