fix: fix small bugs
This commit is contained in:
parent
1eb7517329
commit
c3eb6a6a1d
@ -7,6 +7,7 @@
|
||||
<input
|
||||
id="algolia-search-input"
|
||||
class="search-query"
|
||||
:placeholder="placeholder"
|
||||
>
|
||||
</form>
|
||||
</template>
|
||||
@ -14,9 +15,14 @@
|
||||
<script>
|
||||
export default {
|
||||
props: ['options'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
placeholder: undefined
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.initialize(this.options, this.$lang)
|
||||
this.placeholder = this.$site.themeConfig.searchPlaceholder || ''
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -35,7 +41,11 @@ export default {
|
||||
// #697 Make docsearch work well at i18n mode.
|
||||
algoliaOptions: Object.assign({
|
||||
'facetFilters': [`lang:${lang}`].concat(algoliaOptions.facetFilters || [])
|
||||
}, algoliaOptions)
|
||||
}, algoliaOptions),
|
||||
handleSelected: (input, event, suggestion) => {
|
||||
const { pathname, hash } = new URL(suggestion.url)
|
||||
this.$router.push(`${pathname}${hash}`)
|
||||
}
|
||||
}
|
||||
))
|
||||
})
|
||||
|
@ -45,7 +45,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h4><i class="iconfont reco-tag"></i> 标签</h4>
|
||||
<h4 v-if="$tags.list.length !== 0"><i class="iconfont reco-tag"></i> 标签</h4>
|
||||
<TagList @getCurrentTag="getPagesByTags"></TagList>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vuepress-theme-reco",
|
||||
"version": "1.1.1-alpha.2",
|
||||
"version": "1.1.1-alpha.3",
|
||||
"description": "A simple and beautiful vuepress Blog & Doc theme.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@ -27,14 +27,15 @@
|
||||
"_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.2.1.tgz",
|
||||
"dependencies": {
|
||||
"@vuepress-reco/vuepress-plugin-back-to-top": "^1.0.3",
|
||||
"@vuepress-reco/vuepress-plugin-extract-code": "1.0.1",
|
||||
"@vuepress-reco/vuepress-plugin-extract-code": "^1.0.3",
|
||||
"@vuepress-reco/vuepress-plugin-loading-page": "^1.0.0",
|
||||
"@vuepress-reco/vuepress-plugin-pagation": "^1.0.3",
|
||||
"@vuepress-reco/vuepress-plugin-screenfull": "^1.0.0",
|
||||
"@vuepress-reco/vuepress-plugin-ga": "^1.0.2",
|
||||
"@vuepress-reco/vuepress-plugin-comments": "^1.0.6",
|
||||
"@vuepress-reco/vuepress-plugin-comments": "^1.0.7",
|
||||
"@vuepress/plugin-medium-zoom": "1.2.0",
|
||||
"@vuepress/plugin-blog": "1.3.0",
|
||||
"docsearch.js": "^2.5.2",
|
||||
"leancloud-storage": "3.13.2",
|
||||
"valine": "1.3.6",
|
||||
"vue-click-outside": "1.0.7"
|
||||
|
Loading…
Reference in New Issue
Block a user