1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00
vant/docs/src/ExamplesDocsApp.vue
2017-08-28 13:45:25 +08:00

30 lines
577 B
Vue

<template>
<div class="app">
<zan-doc :simulator="simulatorSrc" :config="config">
<router-view></router-view>
</zan-doc>
</div>
</template>
<script>
import docConfig from './doc.config';
export default {
data() {
return {
config: docConfig['zh-CN']
};
},
computed: {
simulatorSrc() {
const dir = this.$route.path.split('/').pop();
if (dir === 'quickstart' || dir === 'changelog') {
return '/zanui/vue/examples';
} else {
return `/zanui/vue/examples/component/${dir}`;
}
}
}
};
</script>