index.wxml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <view class="search-bar l-container-class">
  2. <slot name="before"/>
  3. <view wx:if="{{address}}" class="icon-container">
  4. <text class="city">{{address}}</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
  11. confirm-type="{{confirmType}}"
  12. class="input l-input-class {{'input'+ TextAlign}}"
  13. value="{{ value }}"
  14. type="{{type}}"
  15. password="{{type==='password'}}"
  16. placeholder="{{placeholder}}"
  17. maxlength="{{maxlength}}"
  18. placeholder-class="pls-class l-placeholder-class"
  19. placeholder-style="{{placeholderStyle}}"
  20. disabled="{{disabled}}"
  21. focus="{{focus}}"
  22. bindinput="handleInputChange"
  23. bindfocus="handleInputFocus"
  24. bindblur="handleInputBlur"
  25. bindconfirm="handleInputConfirm"/>
  26. <view class="close-wrap" wx:if="{{clear&&value}}" bindtap="onClearTap">
  27. <view class="close">
  28. <l-icon name="close" color="#fff" size="15" />
  29. </view>
  30. </view>
  31. </view>
  32. <view wx:if="{{showCancel}}"
  33. class="cancle l-cancel-class"
  34. bindtap="onCancel">
  35. {{cancelText}}
  36. </view>
  37. <slot name="after"/>
  38. </view>