修改主页的搜索框和热词的逻辑
This commit is contained in:
parent
9d5b9a86bc
commit
0cab3dd853
@ -3,10 +3,13 @@
|
||||
}
|
||||
|
||||
.hot-word-container {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
height: 50rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
/* flex: 1; */
|
||||
border-radius: 50rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
.hot-word-scroll {
|
||||
@ -14,9 +17,9 @@
|
||||
}
|
||||
|
||||
.hot-word-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 10px;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 15rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
@ -118,7 +121,6 @@ page {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
@ -699,9 +701,7 @@ page {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.merchantList2{
|
||||
|
||||
}
|
||||
.merchantList2 {}
|
||||
|
||||
.merchantItem {
|
||||
display: flex;
|
||||
|
||||
@ -37,16 +37,18 @@
|
||||
<!-- 搜索框 -->
|
||||
<view class="search2" v-if="isShowSearch">
|
||||
<view class="searchBox2">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
<view class="hot-word-container">
|
||||
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'px)' }">
|
||||
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'rpx)' }">
|
||||
<view v-for="(word, index) in hotWord" :key="index" class="hot-word-item"
|
||||
@click="handleHotWordClick(word)">
|
||||
{{ word }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
<input class="search_input" placeholder='输入搜索的社区名称' confirm-type='search' @input="searchInput"
|
||||
@confirm="searchInput" :value="selectKeyWord" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 轮播图 -->
|
||||
@ -279,7 +281,7 @@ export default {
|
||||
hotWord: [], // 搜索热词
|
||||
scrollPosition: 0, // 滚动位置
|
||||
scrollInterval: null, // 滚动定时器
|
||||
itemHeight: 40, // 每个热词项的高度
|
||||
itemHeight: 50, // 每个热词项的高度
|
||||
|
||||
// 中部1左侧广告
|
||||
serverLeft: '',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user