zoukankan      html  css  js  c++  java
  • C#微信小程序搜索框

     

     话不多说,直接上代码,希望帮助到各位!谢谢

    <view>
        <view>
            <view class="weui-search-bar">
                <view class="weui-search-bar__form">
                    <!-- 最初始时的搜索框 -->
                    <view class="weui-search-bar__box">
                        <icon class="weui-icon-search_in-box" type="search" size="14"></icon>
                        <input type="text" class="weui-search-bar__input" bindinput="SearchBy_NPD" placeholder="搜索" />
                    </view>
                    <!-- 可编辑时的搜索框 -->
                    <label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput">
                        <icon class="weui-icon-search" type="search" size="14"></icon>
                        <view class="weui-search-bar__text">搜索姓名、手机号、地址</view>
                    </label>
                </view>
                <!-- 取消搜索 -->
                <view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消</view>
            </view>
    .wxml
    .weui-search-bar {
      position: relative;
      padding: 8px 10px;
      display: -webkit-box;
      display: -webkit-flex;
      display: flex;
      box-sizing: border-box;
      background-color: #EFEFF4;
      border-top: 1rpx solid #D7D6DC;
      border-bottom: 1rpx solid #D7D6DC;
    }
    
    .weui-icon-search {
      margin-right: 4px;
      font-size: inherit;
    }
    
    .weui-icon-search_in-box {
      position: absolute;
      left: 10px;
      top: 7px;
    }
    
    .weui-search-bar__text {
      display: inline-block;
      font-size: 16px;
    }
    
    .weui-search-bar__form {
      position: relative;
      -webkit-box-flex: 1;
      -webkit-flex: auto;
      flex: auto;
      border-radius: 5px;
      background: #FFFFFF;
      border: 1rpx solid #E6E6EA;
    }
    
    .weui-search-bar__box {
      position: relative;
      padding-left: 30px;
      padding-right: 30px;
       100%;
      box-sizing: border-box;
      z-index: 1;
    }
    
    .weui-search-bar__input {
      height: 28px;
      line-height: 28px;
      font-size: 14px;
    }
    
    .weui-search-bar__label {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 2;
      border-radius: 3px;
      text-align: center;
      color: #9B9B9B;
      background: #FFFFFF;
      line-height: 28px;
    }
    
    .weui-search-bar__cancel-btn {
      margin-left: 10px;
      line-height: 28px;
      color: #09BB07;
      white-space: nowrap;
    }
  • 相关阅读:
    Pythonday01
    PYTHON_DAY2
    PYTHON_DAY3
    数据字典生成SQL语句
    Spring cloud Netflix >readMe
    SecureCRT的安装与激活
    MyBatis映射文件UserMapper.xml(mysql环境)
    数据库模糊查询4种用法
    MyBatis配置文件myBatisconfig.xml
    计算机基础:2进制和2进制算法。
  • 原文地址:https://www.cnblogs.com/zhaoben/p/13820955.html
Copyright © 2011-2022 走看看