index.axml 1.3 KB

1234567891011121314151617181920212223242526272829
  1. <import-sjs
  2. from="./index.sjs"
  3. name="divider" />
  4. <view
  5. a:if="{{ direction === 'horizontal' }}"
  6. class="ant-divider ant-divider-horizontal {{ className || '' }}"
  7. style="{{ style || '' }}">
  8. <view
  9. class="ant-divider-horizontal-left"
  10. style="flex: {{ divider.getLineWidthFlex(textPosition, text)[0] }};{{ lineHeight ? 'border-bottom-width:' + lineHeight + 'px;' : '' }}{{ lineType ? 'border-bottom-style:' + lineType + ';' : '' }}{{ lineColor ? 'border-bottom-color:' + lineColor + ';' : '' }}" />
  11. <slot name="text">
  12. <view
  13. a:if="{{ text }}"
  14. class="ant-divider-horizontal-text {{ textClassName || '' }}"
  15. style="{{ textStyle || '' }}">
  16. {{ text }}
  17. </view>
  18. </slot>
  19. <view
  20. class="ant-divider-horizontal-right"
  21. style="flex: {{ divider.getLineWidthFlex(textPosition, text)[1] }};{{ lineHeight ? 'border-bottom-width:' + lineHeight + 'px;' : '' }}{{ lineType ? 'border-bottom-style:' + lineType + ';' : '' }}{{ lineColor ? 'border-bottom-color:' + lineColor + ';' : '' }}" />
  22. </view>
  23. <view
  24. a:if="{{ direction === 'vertical' }}"
  25. class="ant-divider ant-divider-vertical {{ className || '' }}"
  26. style="{{ style || '' }};{{ lineWidth ? 'border-right-width:' + lineWidth + 'px;' : '' }}{{ lineType ? 'border-right-style:' + lineType + ';' : '' }}{{ lineColor ? 'border-right-color:' + lineColor + ';' : '' }}" />