2020-03-19 18:26:48 +08:00
|
|
|
import { withPrefix } from './utils'
|
|
|
|
|
2020-03-20 18:06:21 +08:00
|
|
|
const rootDebugRoutes = [
|
2020-12-12 13:51:22 +08:00
|
|
|
{
|
|
|
|
path: '/n-popover-debug',
|
|
|
|
component: () => import('../debug-components/popoverDebug.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-back-top-debug',
|
|
|
|
component: () => import('../debug-components/backTopDebug/index.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-cascader-debug',
|
|
|
|
component: () => import('../debug-components/cascaderDebug/index.vue')
|
|
|
|
}
|
2020-03-20 18:06:21 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
const childDebugRoutes = [
|
2020-12-12 13:51:22 +08:00
|
|
|
{
|
|
|
|
path: '/n-scrollbar-debug2',
|
|
|
|
component: () => import('../debug-components/scrollbarDebug2/index.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-date-picker-debug',
|
|
|
|
component: () => import('../debug-components/datePickerDebug/index.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n--debug',
|
|
|
|
component: () => import('../debug-components/suffixDebug/index.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-vertical-align-debug',
|
|
|
|
component: () => import('../debug-components/verticalAlignDebug.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-icon-transition-debug',
|
|
|
|
component: () => import('../debug-components/iconTransitionDebug.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-select-debug',
|
|
|
|
component: () => import('../debug-components/selectDebug.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-router-debug',
|
|
|
|
component: () => import('../debug-components/routerDebug.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-modal-debug',
|
|
|
|
component: () => import('../debug-components/modalDebug/index.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/n-scrollbar-debug',
|
|
|
|
component: () => import('../debug-components/scrollbarDebug/index.vue')
|
|
|
|
}
|
2020-03-19 18:26:48 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
export default function debugRouteMixin (routes, childRoutes) {
|
2020-03-20 17:32:05 +08:00
|
|
|
childRoutes.unshift(...withPrefix('/:lang/:theme/doc', childDebugRoutes))
|
2020-03-20 18:53:14 +08:00
|
|
|
// routes[0].children[1].children = childRoutes
|
2020-03-20 18:06:21 +08:00
|
|
|
routes.unshift(...rootDebugRoutes)
|
2020-03-19 18:26:48 +08:00
|
|
|
}
|