2020-03-19 18:26:48 +08:00
|
|
|
import { withPrefix } from './utils'
|
|
|
|
|
2020-03-20 18:53:14 +08:00
|
|
|
export const childRoutes = withPrefix('/:lang/:theme/doc', [
|
2020-06-18 01:33:55 +08:00
|
|
|
// basic docs
|
2020-12-12 13:51:22 +08:00
|
|
|
{
|
|
|
|
path: '/intro',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/intro/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/start',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/start/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/from-v1',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/vue3/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/experimental-features',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/experimental-features/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/changelog',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/changelog/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/dev-guidelines',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/dev-guidelines/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-theme',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/theme/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
2020-06-18 01:33:55 +08:00
|
|
|
// components
|
2020-12-12 13:51:22 +08:00
|
|
|
{
|
|
|
|
path: '/n-layout',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/layout/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-gradient-text',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/gradient-text/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-icon',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/icon/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-checkbox',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/checkbox/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-button',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/button/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-switch',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/switch/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-data-table',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/data-table/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-input',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/input/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-select',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/select/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-cascader',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/cascader/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-dynamic-input',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/dynamic-input/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-modal',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/modal/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-message',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/message/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-tooltip',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/tooltip/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-popover',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/popover/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-notification',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/notification/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-pagination',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/pagination/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-alert',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/alert/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-date-picker',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/date-picker/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-input-number',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/input-number/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-radio',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/radio/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-form',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/form/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-tabs',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/tabs/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-time-picker',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/time-picker/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-dialog',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/dialog/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-badge',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/badge/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-steps',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/steps/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-collapse',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/collapse/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-progress',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/progress/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-tag',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/tag/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-menu',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/menu/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-timeline',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/timeline/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-back-top',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/back-top/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-divider',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/divider/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-popconfirm',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/popconfirm/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-anchor',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/anchor/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-dropdown',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/dropdown/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-popselect',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/popselect/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-config-provider',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/config-provider/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-transfer',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/transfer/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-spin',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/spin/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-drawer',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/drawer/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-loading-bar',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/loading-bar/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-time',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/time/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-slider',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/slider/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-tree',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/tree/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-affix',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/affix/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-statistic',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/statistic/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-grid',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/grid/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-breadcrumb',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/breadcrumb/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-descriptions',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/descriptions/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-list',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/list/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-card',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/card/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-avatar',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/avatar/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-result',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/result/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-thing',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/thing/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-auto-complete',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/auto-complete/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-empty',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/empty/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-element',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/element/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-log',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/log/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-code',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/code/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-typography',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/typography/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-upload',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/upload/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-table',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/table/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-space',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/space/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-rate',
|
2021-01-12 19:58:41 +08:00
|
|
|
component: () => import('../../src/rate/demos/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
2020-06-18 01:33:55 +08:00
|
|
|
// deprecated
|
2020-12-12 13:51:22 +08:00
|
|
|
{
|
|
|
|
path: '/n-nimbus-service-layout',
|
|
|
|
component: () =>
|
2021-01-13 12:01:02 +08:00
|
|
|
import('../pages/doc/deprecated/nimbus-service-layout/index.entry')
|
2020-12-12 13:51:22 +08:00
|
|
|
}
|
2020-03-20 18:53:14 +08:00
|
|
|
])
|
2020-03-19 18:26:48 +08:00
|
|
|
|
|
|
|
export const routes = [
|
|
|
|
{
|
2020-12-16 11:17:56 +08:00
|
|
|
name: 'site',
|
2020-03-19 18:26:48 +08:00
|
|
|
path: '/:lang/:theme',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../Site.vue'),
|
2020-03-19 18:26:48 +08:00
|
|
|
children: [
|
|
|
|
{
|
2020-12-16 11:17:56 +08:00
|
|
|
name: 'home',
|
2020-03-19 18:26:48 +08:00
|
|
|
path: '/:lang/:theme',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/landing/index.vue')
|
2020-03-19 18:26:48 +08:00
|
|
|
},
|
|
|
|
{
|
2020-12-16 11:17:56 +08:00
|
|
|
name: 'doc',
|
2020-03-19 18:26:48 +08:00
|
|
|
path: '/:lang/:theme/doc',
|
2021-01-13 12:01:02 +08:00
|
|
|
component: () => import('../pages/doc/index.vue'),
|
2020-03-20 18:53:14 +08:00
|
|
|
children: childRoutes
|
2020-03-19 18:26:48 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2020-12-07 00:44:01 +08:00
|
|
|
name: 'not-found',
|
|
|
|
path: '/:pathMatch(.*)*',
|
2020-12-16 11:17:56 +08:00
|
|
|
redirect: {
|
|
|
|
name: 'home',
|
|
|
|
params: {
|
|
|
|
lang: 'zh-CN',
|
|
|
|
theme: 'os-theme'
|
|
|
|
}
|
|
|
|
}
|
2020-03-19 18:26:48 +08:00
|
|
|
}
|
|
|
|
]
|