diff --git a/docs/.vuepress/theme/components/SearchBox/index.vue b/docs/.vuepress/theme/components/SearchBox/index.vue index a434861139a32c447e4e4e3e2b3d99035cd39285..93d580991beb8d67e7bb470d3314cbecb8c45027 100644 --- a/docs/.vuepress/theme/components/SearchBox/index.vue +++ b/docs/.vuepress/theme/components/SearchBox/index.vue @@ -11,7 +11,7 @@ spellcheck="false" @input="query = $event.target.value" @focus="focused = true" - @blur="focused = true" + @blur="focused = false" @keyup.enter="go(focusIndex)" @keyup.up="onUp" @keyup.down="onDown" @@ -23,20 +23,27 @@ style="z-index: 1" @mouseleave="unfocus" > -
  • - -
    - {{ s.title || 'Document' }} - {{ s.header.title }} -
    -
    + +
  • +
    + 暂无结果 +
  • @@ -62,7 +69,7 @@ computed: { showSuggestions() { - return this.focused && this.suggestions && this.suggestions.length; + return this.focused && this.query && this.query.length; // && this.suggestions && this.suggestions.length; }, suggestions() {