Browse Source

搜索页历史搜索优化

master
xuhuajiao 4 weeks ago
parent
commit
e9131f82e0
  1. 11
      src/views/archiveUtilize/archiveSearch/index.vue
  2. 12
      src/views/archivesMIOD/miodSearch/index.vue

11
src/views/archiveUtilize/archiveSearch/index.vue

@ -34,7 +34,7 @@
<div class="history-keyword"> <div class="history-keyword">
<h4>历史检索</h4> <h4>历史检索</h4>
<div class="history-tag"> <div class="history-tag">
<span v-for="(item,index) in historyKeyword" :key="index">{{ item }}</span>
<span v-for="(item,index) in historyKeyword" :key="index" style="cursor: pointer;" @click="historySearch(item)">{{ item }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -377,6 +377,11 @@ export default {
}, },
dimSearch() { dimSearch() {
}, },
historySearch(item) {
this.keywords = item
this.handleSearch()
},
handleSearch() { handleSearch() {
if (this.keywords) { if (this.keywords) {
this.isResult = true this.isResult = true
@ -566,6 +571,10 @@ export default {
background: #E6E8ED; background: #E6E8ED;
border-radius: 3px; border-radius: 3px;
cursor:default; cursor:default;
&:hover{
background: #0348F3;
color: #fff;
}
} }
} }
} }

12
src/views/archivesMIOD/miodSearch/index.vue

@ -34,7 +34,7 @@
<div class="history-keyword"> <div class="history-keyword">
<h4>历史检索</h4> <h4>历史检索</h4>
<div class="history-tag"> <div class="history-tag">
<span v-for="(item,index) in historyKeyword" :key="index">{{ item }}</span>
<span v-for="(item,index) in historyKeyword" :key="index" style="cursor: pointer;" @click="historySearch(item)">{{ item }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -379,6 +379,10 @@ export default {
}, },
dimSearch() { dimSearch() {
}, },
historySearch(item) {
this.keywords = item
this.handleSearch()
},
handleSearch() { handleSearch() {
if (this.keywords) { if (this.keywords) {
this.isResult = true this.isResult = true
@ -568,7 +572,11 @@ export default {
color: #545B65; color: #545B65;
background: #E6E8ED; background: #E6E8ED;
border-radius: 3px; border-radius: 3px;
cursor:default;
cursor:default;;
&:hover{
background: #0348F3;
color: #fff;
}
} }
} }
} }

Loading…
Cancel
Save