naive-ui/demo/routes/debugRouteMixin.js

47 lines
1.7 KiB
JavaScript
Raw Normal View History

2020-03-19 18:26:48 +08:00
import routerDebug from '../debugComponents/routerDebug'
import modalDebug from '../debugComponents/modalDebug'
import datePickerDebug from '../debugComponents/datePickerDebug'
import backTopDebug from '../debugComponents/backTopDebug'
import suffixDebug from '../debugComponents/suffixDebug'
import cascaderDebug from '../debugComponents/cascaderDebug'
import verticalAlignDebug from '../debugComponents/verticalAlignDebug'
import iconTransitionDebug from '../debugComponents/iconTransitionDebug'
import selectDebug from '../debugComponents/selectDebug'
import popoverDebug from '../debugComponents/popoverDebug'
import scrollbarDebug from '../debugComponents/scrollbarDebug'
import scrollbarDebug2 from '../debugComponents/scrollbarDebug2'
import { withPrefix } from './utils'
2020-03-19 20:08:08 +08:00
const rootDebugRoutes = [
2020-03-19 18:26:48 +08:00
{
path: '/n-popover-debug',
component: popoverDebug
},
{
path: '/n-back-top-debug',
component: backTopDebug
},
{
path: '/n-cascader-debug',
component: cascaderDebug
}
]
2020-03-19 20:08:08 +08:00
const childDebugRoutes = [
2020-03-19 18:26:48 +08:00
{ path: '/n-scrollbar-debug2', component: scrollbarDebug2 },
{ path: '/n-date-picker-debug', component: datePickerDebug },
{ path: '/n--debug', component: suffixDebug },
{ path: '/n-vertical-align-debug', component: verticalAlignDebug },
{ path: '/n-icon-transition-debug', component: iconTransitionDebug },
{ path: '/n-select-debug', component: selectDebug },
{ path: '/n-router-debug', component: routerDebug },
{ path: '/n-modal-debug', component: modalDebug },
{ path: '/n-scrollbar-debug', component: scrollbarDebug }
]
export default function debugRouteMixin (routes, childRoutes) {
2020-03-19 20:08:08 +08:00
routes.unshift(rootDebugRoutes)
childRoutes.unshift(withPrefix('/:lang/:theme/doc', childDebugRoutes))
2020-03-19 18:26:48 +08:00
}