没有合适的资源?快使用搜索试试~ 我知道了~
首页微信小程序之搜索分页功能的实现代码
资源详情
资源评论
资源推荐

微信小程序之搜索分页功能的实现代码微信小程序之搜索分页功能的实现代码
主要介绍了微信小程序之搜索分页功能的实现代码,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作
具有一定的参考借鉴价值,需要的朋友可以参考下
直接上代码:
wxml:
<wxs src="../wxs/changeimg.wxs" module="changeimg" />
<view class="container">
<view class="search_input">
<image class="back" src="" mode="widthFix"></image>
<input type="text" class="weui-input" maxlength="10" placeholder="搜索" value="{{value}}" bindinput="changeModel" bindconfirm="search" data-key="value"/>
<image class="scan_code" src="" mode="widthFix" ></image>
</view>
<!--搜索菜品做法列表 -->
<view class="modus_operandi">
<view class="search_no" wx:if="{{searchLen==0&&clickEnter==1}}" >
<text>很抱歉,没有找到您要搜索的资料/(ㄒoㄒ)/~~</text>
</view>
<view class="modus_operandi_total"
wx:for="{{searchData}}"
wx:key="id"
bindtap="jumpVegetables"
data-cid="{{item.classid}}"
>
<image class="modus_operandi_pic" mode="widthFix" src="{{changeimg.getimageurl(item.defaultpic)}}"></image>
<view class="modus_operandi_title">{{item.title}}</view>
</view>
</view>
</view>
wxss:
page{
background: #fff;
}
.back{
width: 20rpx;
height: 20rpx;
margin-top: 39rpx;
margin-right: 20rpx;
margin-left: 20rpx;
}
.search_input {
height: 110rpx;
padding: 10rpx;
background: url("https://mini.qianjiwang.cn/img/top.png")no-repeat center;
background-size: 100% 700rpx;
display: flex;
position: relative;
}
.search_input input {
height: 70rpx;
background-color: #fff;
border-radius: 50rpx;
font-size: 32rpx;
color: #000;
width: 80%;
margin-left: 0rpx;
background: #a7d9fe;
margin-top: 20rpx;
padding-left: 30rpx;
}
.scan_code{
flex: 1;
width: 40rpx;
height: 40rpx;
margin-left: 30rpx;
margin-top: 27rpx;
}
.modus_operandi{
padding: 20rpx;
display: flex;
flex-wrap: wrap;
margin-top: 50rpx;
}
.modus_operandi_total{
width: 47%;
padding: 10rpx;
}
















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0