index.wxml 1.3 KB

123456789101112131415161718192021
  1. <view class="search-bar l-container-class">
  2. <slot name="before"/>
  3. <view wx:if="{{frontText}}" class="icon-container" mut-bind:tap="handleTapFrontText">
  4. <text class="city">{{frontText}}</text>
  5. <l-icon name="down" color="#333" size="22"/>
  6. </view>
  7. <view class="search-input l-class {{'search-input-'+ shape}}" style="{{'background-color:'+bgColor}}">
  8. <slot wx:if="{{custom}}" name="icon"/>
  9. <l-icon wx:else name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}" l-class="l-icon-class"/>
  10. <input confirm-type="{{confirmType}}" class="input l-input-class {{'input'+ TextAlign}}" value="{{ value }}" type="{{type}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class l-placeholder-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
  11. <view class="close-wrap" wx:if="{{clear&&value}}" mut-bind:tap="onClearTap">
  12. <view class="close">
  13. <l-icon name="close" color="#fff" size="15"/>
  14. </view>
  15. </view>
  16. </view>
  17. <view wx:if="{{showCancel}}" class="cancel l-cancel-class" mut-bind:tap="onCancel">
  18. {{cancelText}}
  19. </view>
  20. <slot name="after"/>
  21. </view>