[Doc] support doc search

This commit is contained in:
陈嘉涵
2019-05-21 15:24:40 +08:00
parent ead802d9f1
commit 7ef5cc0ce2
5 changed files with 334 additions and 134 deletions

View File

@@ -4,7 +4,9 @@
:base="base"
:config="config"
active="Vue 组件"
:lang="$vantLang"
:simulators="simulators"
:search-config="searchConfig"
:current-simulator="currentSimulator"
>
<router-view @changeDemoURL="onChangeDemoURL" />
@@ -17,6 +19,7 @@ import docConfig from './doc.config';
export default {
data() {
this.searchConfig = docConfig.searchConfig;
return {
simulators: [`mobile.html${location.hash}`],
demoURL: ''

View File

@@ -2,12 +2,15 @@
const version = require('../../package.json').version;
module.exports = {
searchConfig: {
apiKey: '90067aecdaa2c85220e2783cd305caac',
indexName: 'vant',
},
'zh-CN': {
header: {
logo: {
image: 'https://img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png',
title: 'Vant',
version,
href: '#/'
},
nav: {
@@ -342,7 +345,6 @@ module.exports = {
logo: {
image: 'https://img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png',
title: 'Vant',
version,
href: '#/'
},
nav: {