增加热门搜索显示控制

This commit is contained in:
weinan2087
2022-11-15 18:03:22 +08:00
parent 5a499eec55
commit 2bf36d1283

View File

@@ -49,12 +49,12 @@
<view class="words">
<view class="words-top">
<view class="words-title">热门搜索</view>
<view class="words-clear" @click="cleanHistory()">
<view class="words-clear" @click="hotSearch()">
<image src="../../static/images/icon/eye.png" mode="" style="margin-right: 15px;width: 32upx;height: 24upx;"></image>
</view>
</view>
<view class="words-items">
<view class="words-items" v-if="showHotSearch">
<view v-for="(hw,hwidx) in hotWords" :key="hwidx" @tap="wordSearch(hw)" class="words-item">{{hw}}</view>
</view>
</view>
@@ -266,6 +266,7 @@
import apiQa from '@/api/modules/qa.js'
import {toScore} from '@/utils/tools.js'
import apiArticle from '@/api/modules/article.js'
import apiBoeCourse from '@/api/boe/course.js'
export default{
data(){
return{
@@ -463,6 +464,12 @@
this.isOpen = true;
}
},
cleanHistory(){
this.clearShow=true;
},
// 热门搜索显示控制
hotSearch(){
this.showHotSearch = !this.showHotSearch;
},