From 45f6393efa0599afb7ddc1ace4d5ddcd278f563e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vinicius=20Juli=C3=A3o?= <40807325+vrjuliao@users.noreply.github.com> Date: Mon, 29 Jul 2019 15:40:54 -0300 Subject: [PATCH 1/7] Default theme is not work as expected I'm trying changing max suggestions like the link https://vuepress.vuejs.org/default-theme-config/#search-box But it was not work. I fix this bug. --- packages/@vuepress/plugin-search/SearchBox.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vuepress/plugin-search/SearchBox.vue b/packages/@vuepress/plugin-search/SearchBox.vue index 6fbbd70b3e..27a8c952f6 100644 --- a/packages/@vuepress/plugin-search/SearchBox.vue +++ b/packages/@vuepress/plugin-search/SearchBox.vue @@ -62,7 +62,7 @@ export default { } const { pages } = this.$site - const max = SEARCH_MAX_SUGGESTIONS + const max = this.$site.themeConfig.searchMaxSuggestions || SEARCH_MAX_SUGGESTIONS const localePath = this.$localePath const matches = item => ( item.title From 7aa97533fe646c44ef20b85450eac4f9e8f89437 Mon Sep 17 00:00:00 2001 From: giraud florent Date: Sat, 7 Sep 2019 02:11:21 -0400 Subject: [PATCH 2/7] chore(search): fix search const vars and test --- .../@vuepress/plugin-search/SearchBox.vue | 343 ++++++++++-------- 1 file changed, 194 insertions(+), 149 deletions(-) diff --git a/packages/@vuepress/plugin-search/SearchBox.vue b/packages/@vuepress/plugin-search/SearchBox.vue index 27a8c952f6..f67c5d6fe4 100644 --- a/packages/@vuepress/plugin-search/SearchBox.vue +++ b/packages/@vuepress/plugin-search/SearchBox.vue @@ -12,7 +12,7 @@ @keyup.enter="go(focusIndex)" @keyup.up="onUp" @keyup.down="onDown" - > + />