|
|
|
@ -1,12 +1,7 @@
|
|
|
|
|
import Layout from './components/layout.vue';
|
|
|
|
|
import Iframe from './components/iframe.vue';
|
|
|
|
|
import demoRoutes from './demoRoutes';
|
|
|
|
|
import NProgress from 'nprogress';
|
|
|
|
|
|
|
|
|
|
const beforeEnter = (to, from, next) => {
|
|
|
|
|
NProgress.start();
|
|
|
|
|
next();
|
|
|
|
|
};
|
|
|
|
|
export default [
|
|
|
|
|
{
|
|
|
|
|
path: '/ant-design-vue/components',
|
|
|
|
@ -15,10 +10,7 @@ export default [
|
|
|
|
|
const name = route.path.split('/ant-design-vue/components/')[1].split('/')[0];
|
|
|
|
|
return { name, showDemo: true };
|
|
|
|
|
},
|
|
|
|
|
children: demoRoutes.map(item => ({
|
|
|
|
|
...item,
|
|
|
|
|
beforeEnter,
|
|
|
|
|
})),
|
|
|
|
|
children: demoRoutes,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/ant-design-vue/iframe',
|
|
|
|
@ -42,92 +34,74 @@ export default [
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/customize-theme',
|
|
|
|
|
component: () => import('../docs/vue/customize-theme.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/customize-theme-cn',
|
|
|
|
|
component: () => import('../docs/vue/customize-theme.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/getting-started',
|
|
|
|
|
component: () => import('../docs/vue/getting-started.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/getting-started-cn',
|
|
|
|
|
component: () => import('../docs/vue/getting-started.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/i18n',
|
|
|
|
|
component: () => import('../docs/vue/i18n.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/i18n-cn',
|
|
|
|
|
component: () => import('../docs/vue/i18n.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/introduce',
|
|
|
|
|
component: () => import('../docs/vue/introduce.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/introduce-cn',
|
|
|
|
|
component: () => import('../docs/vue/introduce.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/use-with-vue-cli',
|
|
|
|
|
component: () => import('../docs/vue/use-with-vue-cli.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/use-with-vue-cli-cn',
|
|
|
|
|
component: () => import('../docs/vue/use-with-vue-cli.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/faq',
|
|
|
|
|
component: () => import('../docs/vue/faq.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/faq-cn',
|
|
|
|
|
component: () => import('../docs/vue/faq.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/download',
|
|
|
|
|
component: () => import('../docs/vue/download.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/download-cn',
|
|
|
|
|
component: () => import('../docs/vue/download.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/sponsor',
|
|
|
|
|
component: () => import('../docs/vue/sponsor.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/sponsor-cn',
|
|
|
|
|
component: () => import('../docs/vue/sponsor.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/changelog',
|
|
|
|
|
component: () => import('../CHANGELOG.en-US.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'docs/vue/changelog-cn',
|
|
|
|
|
component: () => import('../CHANGELOG.zh-CN.md'),
|
|
|
|
|
beforeEnter,
|
|
|
|
|
},
|
|
|
|
|
{ path: '', redirect: '/ant-design-vue/vue/docs/introduce/' },
|
|
|
|
|
],
|
|
|
|
|