|
|
@@ -146,17 +146,20 @@
|
|
|
</van-list>
|
|
|
<div class="search-content" v-else>
|
|
|
<div class="hot-content" v-if="historys.length > 0">
|
|
|
- <div class="title">最近搜索</div>
|
|
|
+ <div class="hot-content-con">
|
|
|
+ <div class="title">最近搜索</div>
|
|
|
+ <img src="@assets/icon-delete.png" @click="clear" alt="" class="hot-content-con-img"/>
|
|
|
+ </div>
|
|
|
<div class="hot-list">
|
|
|
<span v-for="(item, index) in historys" :key="index" @click="getSearch(item)">{{ item }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="hot-content" v-if="hots.length > 0">
|
|
|
+ <!-- <div class="hot-content" v-if="hots.length > 0">
|
|
|
<div class="title">热门搜索</div>
|
|
|
<div class="hot-list">
|
|
|
<span v-for="(item, index) in hots" :key="index" @click="getSearch(item)">{{ item }}</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -251,6 +254,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ clear() {
|
|
|
+ this.$dialog
|
|
|
+ .confirm({
|
|
|
+ message: '确定要清除全部搜索记录吗?'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.clearHistory();
|
|
|
+ });
|
|
|
+ },
|
|
|
changeSort() {
|
|
|
this.showAction = true;
|
|
|
},
|
|
|
@@ -321,7 +333,7 @@ export default {
|
|
|
.search {
|
|
|
background: @bg;
|
|
|
}
|
|
|
-/deep/.van-list__finished-text{
|
|
|
+/deep/.van-list__finished-text {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
.search_con {
|
|
|
@@ -419,19 +431,28 @@ export default {
|
|
|
padding-top: 8px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
-.list{
|
|
|
+.list {
|
|
|
margin-bottom: 80px;
|
|
|
}
|
|
|
.hot-content {
|
|
|
padding: 20px 0 6px 16px;
|
|
|
box-sizing: border-box;
|
|
|
+ .hot-content-con{
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ align-items: center;
|
|
|
+ .hot-content-con-img{
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin-left: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.title {
|
|
|
font-size: 16px;
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
color: #ffffff;
|
|
|
line-height: 22px;
|
|
|
- margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.hot-list {
|