mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix: algoliasearch wrong search parameter (#2065)
This commit is contained in:
@@ -114,11 +114,7 @@ export default {
|
||||
|
||||
querySearch(query, cb) {
|
||||
if (!query) return
|
||||
this.index.search({ query, hitsPerPage: 6 }, (err, res) => {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
return
|
||||
}
|
||||
this.index.search(query, { hitsPerPage: 6 }).then(res => {
|
||||
if (res.hits.length > 0) {
|
||||
this.isEmpty = false
|
||||
cb(res.hits.map(hit => {
|
||||
@@ -143,6 +139,9 @@ export default {
|
||||
this.isEmpty = true
|
||||
cb([{ isEmpty: true }])
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error(err)
|
||||
return
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user