index.wxml 648 B

12345678910111213141516171819
  1. <view class="i-divider i-class" style="{{parse.getStyle(color,size,height)}}">
  2. <view class="i-divider-content" wx:if="{{content !== ''}}">
  3. {{content}}
  4. </view>
  5. <view class="i-divider-content" wx:else>
  6. <slot></slot>
  7. </view>
  8. <view class="i-divider-line" style="background:{{lineColor}}"></view>
  9. </view>
  10. <wxs module="parse">
  11. module.exports = {
  12. getStyle : function(color,size,height){
  13. var color = 'color:' + color +';';
  14. var size = 'font-size:' + size + 'px;';
  15. var height = 'height:' + height+'px;'
  16. return color + size + height;
  17. }
  18. }
  19. </wxs>