docs: support version switch

This commit is contained in:
陈嘉涵 2019-08-28 09:51:13 +08:00
parent 3691cc409c
commit f7fa7698a8
2 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@
active="小程序组件"
:config="config"
:github="github"
:versions="versions"
:simulator="simulator"
>
<router-view />
@ -10,7 +11,7 @@
</template>
<script>
import docConfig, { github } from './doc.config';
import docConfig, { github, versions } from './doc.config';
const UNSHARED = [
'common',
@ -23,7 +24,8 @@ const UNSHARED = [
export default {
data() {
return {
github
github,
versions
};
},

View File

@ -5,10 +5,11 @@ const { version } = packageJson;
export const github = 'https://github.com/youzan/vant-weapp';
export const versions = [version, '0.x'];
export default {
header: {
logo: {
version,
image: 'https://img.yzcdn.cn/vant/logo.png',
title: 'Vant Weapp',
href: '#/'