|
@@ -64,7 +64,7 @@
|
|
|
v-html="highlightKeyword(item.title.split('&')[0])"
|
|
|
/>
|
|
|
<div
|
|
|
- v-if="!resultList.length"
|
|
|
+ v-if="!resultList.length && keyword"
|
|
|
class="no-data"
|
|
|
>
|
|
|
<img
|
|
@@ -115,9 +115,16 @@ export default {
|
|
|
return tempArr
|
|
|
},
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ hotspotData: {
|
|
|
+ handler(vNew) {
|
|
|
+ this.onClickSearch()
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.historyList = JSON.parse(localStorage.getItem('hotspot-search-history')) || []
|
|
|
- this.onClickSearch()
|
|
|
},
|
|
|
destroyed() {
|
|
|
localStorage.setItem('hotspot-search-history', JSON.stringify(this.historyList))
|