You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/site/routes.js

67 lines
1.9 KiB

7 years ago
import Layout from './components/layout.vue'
const AsyncTestComp = () => {
7 years ago
const d = window.location.hash.replace('#', '')
return {
7 years ago
component: import(`../components/layout/demo/${d}`),
7 years ago
}
}
7 years ago
7 years ago
export default [
7 years ago
{ path: '/ant-design/components/:name/', component: Layout, props: true },
{
path: '/ant-design',
component: Layout,
props: (route) => {
7 years ago
const name = route.path.split('/docs/vue/')[1].split('/')[0]
7 years ago
return { name }
},
children: [
{
7 years ago
path: 'docs/vue/customize-theme',
7 years ago
component: () => import('../docs/vue/customize-theme.en-US.md'),
},
{
7 years ago
path: 'docs/vue/customize-theme-cn',
7 years ago
component: () => import('../docs/vue/customize-theme.zh-CN.md'),
},
{
7 years ago
path: 'docs/vue/getting-started',
7 years ago
component: () => import('../docs/vue/getting-started.en-US.md'),
},
{
7 years ago
path: 'docs/vue/getting-started-cn',
7 years ago
component: () => import('../docs/vue/getting-started.zh-CN.md'),
},
{
7 years ago
path: 'docs/vue/i18n',
7 years ago
component: () => import('../docs/vue/i18n.en-US.md'),
},
{
7 years ago
path: 'docs/vue/i18n-cn',
7 years ago
component: () => import('../docs/vue/i18n.zh-CN.md'),
},
{
7 years ago
path: 'docs/vue/introduce',
7 years ago
component: () => import('../docs/vue/introduce.en-US.md'),
},
{
7 years ago
path: 'docs/vue/introduce-cn',
7 years ago
component: () => import('../docs/vue/introduce.zh-CN.md'),
},
{
7 years ago
path: 'docs/vue/use-with-vue-cli',
7 years ago
component: () => import('../docs/vue/use-with-vue-cli.en-US.md'),
},
{
7 years ago
path: 'docs/vue/use-with-vue-cli-cn',
7 years ago
component: () => import('../docs/vue/use-with-vue-cli.zh-CN.md'),
},
7 years ago
{ path: '', redirect: '/ant-design/vue/docs/introduce/' },
7 years ago
],
},
{ path: '/:prefix?/test/:demo?/', component: AsyncTestComp },
7 years ago
{ path: '/*', redirect: '/ant-design/docs/vue/introduce/' },
7 years ago
]