index.wxml 1.6 KB

123456789101112131415161718192021
  1. <label class='form-item {{disabled? "disabled": ""}} l-class form-item-{{labelLayout}}' style="width:{{width}}rpx">
  2. <view class="mask" wx:if="{{disabled}}"></view>
  3. <view class="row" hidden="{{ showRow ? '' : 'hidden' }}" style="width:{{width}}rpx;"></view>
  4. <view wx:if="{{label && !labelCustom}}" hidden="{{hideLabel}}" class="form-label l-label-class form-label-{{labelLayout}}" style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout== "top" ? labelWidth + "rpx" : "" }}'>
  5. <text><text class="text-require" wx:if="{{required}}">* </text>{{label}}<text wx:if="{{colon}}">:</text>
  6. </text>
  7. </view>
  8. <view wx:else hidden="{{hideLabel}}" class="form-label l-label-class form-label-{{labelLayout}}" style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout== "top" ? labelWidth + "rpx" : "" }}'>
  9. <slot name="left"/>
  10. </view>
  11. <input class="input {{hideLabel?'hideLabel':''}}" value="{{ value }}" type="{{type}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
  12. <view class="close" wx:if="{{clear&&value}}" bindtap="onClearTap">
  13. <view class="close-icon">
  14. <l-icon name="close" color="#fff" size="16"/>
  15. </view>
  16. </view>
  17. <slot name="right"/>
  18. <l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
  19. </label>