修正部分机型下搜索框显示错误的bug

This commit is contained in:
zhl 2019-04-18 16:43:15 +08:00
parent ff0b19ea29
commit a4c20f32eb
2 changed files with 19 additions and 15 deletions

View File

@ -7,7 +7,7 @@
.grid-list { .grid-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 5rpx; padding: 5rpx 0;
} }
</style> </style>
@ -16,17 +16,19 @@
<view class="top-action-bar"> <view class="top-action-bar">
<view class="weui-search-bar"> <view class="weui-search-bar">
<view class="weui-search-bar__form"> <view class="weui-search-bar__form">
<view class="weui-search-bar__box"> <view class="weui-search-bar__box" hidden="{{!inputShowed}}">
<icon class="weui-icon-search_in-box" type="search" size="14"></icon> <icon class="weui-icon-search_in-box" type="search" size="14"></icon>
<input type="text" class="weui-search-bar__input" confirm-type="search" placeholder="输入游戏名" value="{{inputVal}}" focus="{{inputShowed}}" bindconfirm="endInput" /> <input type="text" class="weui-search-bar__input" confirm-type="search" placeholder="" value="{{inputVal}}" focus="{{inputShowed}}" bindconfirm="endInput" />
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput"> <view class="weui-icon-clear" hidden="{{inputVal.length === 0}}" bindtap="clearInput">
<icon type="clear" size="14"></icon> <icon type="clear" size="14"></icon>
</view> </view>
</view> </view>
<label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput"> <view class="weui-search-bar__box" hidden="{{inputShowed}}">
<icon class="weui-icon-search" type="search" size="14"></icon> <label class="weui-search-bar__label" bindtap="showInput">
<view class="weui-search-bar__text">输入游戏名</view> <icon class="weui-icon-search" type="search" size="14"></icon>
</label> <view class="weui-search-bar__text">输入游戏名</view>
</label>
</view>
</view> </view>
<view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消</view> <view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消</view>
</view> </view>
@ -48,16 +50,16 @@
</view> </view>
</view> </view>
</view> </view>
<view > <!--<view >-->
<repeat for="{{records}}" item="item" >
<recordCell :item="item" @gameCellTap.user="gameTap" :showAll.sync = 'showAll'/>
</repeat>
</view>
<!--<view class="grid-list">-->
<!--<repeat for="{{records}}" item="item" >--> <!--<repeat for="{{records}}" item="item" >-->
<!--<gridCell :item="item" @gameCellTap.user="gameTap" :showAll.sync = 'showAll'/>--> <!--<recordCell :item="item" @gameCellTap.user="gameTap" :showAll.sync = 'showAll'/>-->
<!--</repeat>--> <!--</repeat>-->
<!--</view>--> <!--</view>-->
<view class="grid-list">
<repeat for="{{records}}" item="item" >
<gridCell :item="item" @gameCellTap.user="gameTap" :showAll.sync = 'showAll'/>
</repeat>
</view>
<zanLoadmore :loading.sync="loading" :nodata.sync="noData" :nomore.sync="noMore" nodata_str="暂无数据"></zanLoadmore> <zanLoadmore :loading.sync="loading" :nodata.sync="noData" :nomore.sync="noMore" nodata_str="暂无数据"></zanLoadmore>
<toast/> <toast/>
</view> </view>

View File

@ -51,6 +51,7 @@
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
z-index: 1; z-index: 1;
height: @weuiSearchBarHeight;
} }
.weui-search-bar__input { .weui-search-bar__input {
height: @weuiSearchBarHeight; height: @weuiSearchBarHeight;
@ -76,6 +77,7 @@
color: #9B9B9B; color: #9B9B9B;
background: #FFFFFF; background: #FFFFFF;
line-height: @weuiSearchBarHeight; line-height: @weuiSearchBarHeight;
height: 28px;
} }
.weui-search-bar__cancel-btn { .weui-search-bar__cancel-btn {
margin-left: 10px; margin-left: 10px;