• 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;
    }
  • 相关阅读:
    C# 1.0 到 C# 3.0 委托创建过程的发展
    C#禁用窗体最大化按钮
    TeamViewer 通过Internet进行远程访问和远程支持
    c# 匿名方法
    BeginInvoke会重新开一个线程
    c# 线程调用带参数的函数
    c# msdn 委托
    判断某张表是否存在在数据库中(access 2003 与sql server 2008)
    新浪微博自动发送微博 功能已实现(net)
    validateRequest="false" 在asp.net 4.0中失效的解决办法
  • 原文地址:https://www.cnblogs.com/zhaoben/p/13820955.html
Copyright © 2020-2023  润新知