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

View File

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