forked from vueComponent/ant-design-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
110 lines (109 loc) · 3.04 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import Layout from './components/layout.vue';
import Iframe from './components/iframe.vue';
import demoRoutes from './demoRoutes';
export default [
{
path: '/components',
component: Layout,
props: route => {
const name = route.path.split('/components/')[1].split('/')[0];
return { name, showDemo: true };
},
children: demoRoutes,
},
{
path: '/iframe',
component: Iframe,
children: demoRoutes.map(item => ({
...item,
props: route => {
const hash = route.hash.replace('#', '');
return { iframeName: hash };
},
})),
},
{
path: '/',
component: Layout,
props: route => {
const name = route.path.split('/docs/vue/')[1].split('/')[0];
return { name, showApi: true };
},
children: [
{
path: 'docs/vue/customize-theme',
component: () => import('../docs/vue/customize-theme.en-US.md'),
},
{
path: 'docs/vue/customize-theme-cn',
component: () => import('../docs/vue/customize-theme.zh-CN.md'),
},
{
path: 'docs/vue/getting-started',
component: () => import('../docs/vue/getting-started.en-US.md'),
},
{
path: 'docs/vue/getting-started-cn',
component: () => import('../docs/vue/getting-started.zh-CN.md'),
},
{
path: 'docs/vue/i18n',
component: () => import('../docs/vue/i18n.en-US.md'),
},
{
path: 'docs/vue/i18n-cn',
component: () => import('../docs/vue/i18n.zh-CN.md'),
},
{
path: 'docs/vue/introduce',
component: () => import('../docs/vue/introduce.en-US.md'),
},
{
path: 'docs/vue/introduce-cn',
component: () => import('../docs/vue/introduce.zh-CN.md'),
},
{
path: 'docs/vue/use-with-vue-cli',
component: () => import('../docs/vue/use-with-vue-cli.en-US.md'),
},
{
path: 'docs/vue/use-with-vue-cli-cn',
component: () => import('../docs/vue/use-with-vue-cli.zh-CN.md'),
},
{
path: 'docs/vue/faq',
component: () => import('../docs/vue/faq.en-US.md'),
},
{
path: 'docs/vue/faq-cn',
component: () => import('../docs/vue/faq.zh-CN.md'),
},
{
path: 'docs/vue/download',
component: () => import('../docs/vue/download.en-US.md'),
},
{
path: 'docs/vue/download-cn',
component: () => import('../docs/vue/download.zh-CN.md'),
},
{
path: 'docs/vue/sponsor',
component: () => import('../docs/vue/sponsor.en-US.md'),
},
{
path: 'docs/vue/sponsor-cn',
component: () => import('../docs/vue/sponsor.zh-CN.md'),
},
{
path: 'docs/vue/changelog',
component: () => import('../CHANGELOG.en-US.md'),
},
{
path: 'docs/vue/changelog-cn',
component: () => import('../CHANGELOG.zh-CN.md'),
},
{ path: '', redirect: '/vue/docs/introduce/' },
],
},
{ path: '/*', redirect: '/docs/vue/introduce/' },
];