index.axml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <view
  2. class="ant-form-item {{ className ? className : '' }} ant-form-item-{{ requiredMark }}">
  3. <slot
  4. name="header"
  5. errors="{{ errors }}"
  6. status="{{ status }}" />
  7. <view
  8. class="ant-form-item-line ant-form-item-line-{{ position }} {{ errorInfo ? 'noLine' : '' }}">
  9. <view class="ant-form-item-content ant-form-item-content-{{ position }}">
  10. <view
  11. a:if="{{ label }}"
  12. style="{{ labelWidth ? 'width: ' + labelWidth : '' }}"
  13. class="ant-form-item-label {{ disabled ? 'ant-form-item-label-disabled' : '' }} ant-form-item-label-{{ position }} {{ required ? 'ant-form-item-label-required' : '' }}">
  14. <view class="ant-form-item-label-text">{{ label }}</view>
  15. <popover a:if="{{ tooltip }}">
  16. <view
  17. slot="content"
  18. class="ant-form-item-label-help-content">
  19. {{ tooltip }}
  20. </view>
  21. <ant-icon type="QuestionCircleOutline" />
  22. </popover>
  23. <slot
  24. a:else
  25. name="tooltip" />
  26. </view>
  27. <view class="ant-form-item-field ant-form-item-field-{{ position }}">
  28. <slot />
  29. <view
  30. a:if="{{ help || ((validateStatus === 'error' || !validateStatus) && status === 'error') }}"
  31. class="{{ validateStatus === 'error' || !validateStatus && status === 'error' ? 'ant-form-item-error-info' : 'ant-form-item-help-info' }} ant-form-item-error-info-{{ position }}">
  32. <view>{{ help || errors[0] }}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="ant-form-item-extra">
  37. <slot name="extra" />
  38. </view>
  39. </view>
  40. <slot
  41. name="footer"
  42. errors="{{ errors }}"
  43. status="{{ status }}" />
  44. </view>