index.wxml 1.3 KB

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