|
|
@@ -10,7 +10,7 @@
|
|
|
<i class="icon-sousuo iconfont"></i>
|
|
|
<span>{{similar}}</span>
|
|
|
</li>
|
|
|
- <li>查找“{{keyword}}”</li>
|
|
|
+ <li @click="onAssociateClick(keyword)">查找“{{keyword}}”</li>
|
|
|
</ul>
|
|
|
<div class="hot-history" v-show="!associate.show">
|
|
|
<div class="search-history">
|
|
|
@@ -56,11 +56,11 @@
|
|
|
}
|
|
|
},
|
|
|
// filters: {
|
|
|
-// similarFilter: function (key) {
|
|
|
-// let keyword = this.keyword
|
|
|
+// similarFilter: function ([key, keyword]) {
|
|
|
+// console.log(keyword)
|
|
|
// let index = key.indexOf(keyword)
|
|
|
// if (index !== -1) {
|
|
|
-// key = key.substring(0, index) + '<strong>' + key.sub(index, keyword.length) + '</strong>' + key.substring(index + keyword.length, key.length)
|
|
|
+// key = key.substring(0, index) + '<strong>' + key.substr(index, keyword.length) + '</strong>' + key.substring(index + keyword.length, key.length)
|
|
|
// }
|
|
|
// return key
|
|
|
// }
|
|
|
@@ -71,7 +71,6 @@
|
|
|
this.keyword = key
|
|
|
}
|
|
|
if (this.keyword) {
|
|
|
- this.associate.show = false
|
|
|
this.$router.push({path: '/mobile/search?w=' + encodeURIComponent(this.keyword)})
|
|
|
}
|
|
|
},
|