mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-31 14:20:53 +08:00
modify(some debugComponents router path
This commit is contained in:
parent
6999c1e9e4
commit
0194e1b080
@ -1,5 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import VueRouter from 'vue-router'
|
||||
import ComponentDemo from './utils/ComponentDemo'
|
||||
import ComponentDemos from './utils/ComponentDemos'
|
||||
import ComponentDocumentation from './utils/ComponentDocumentation'
|
||||
@ -9,6 +10,7 @@ import EditOnGithubHeader from './utils/EditOnGithubHeader'
|
||||
import './styles/demo.scss'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: 'zh-CN'
|
||||
|
@ -832,7 +832,7 @@ export default function (locale, instance) {
|
||||
},
|
||||
{
|
||||
name: 'PopoverDebug',
|
||||
path: `/${instance.lang}/${instance.theme}/doc` + '/n-popover-debug'
|
||||
path: '/n-popover-debug'
|
||||
},
|
||||
{
|
||||
name: 'RouterDebug',
|
||||
@ -856,11 +856,11 @@ export default function (locale, instance) {
|
||||
},
|
||||
{
|
||||
name: 'BackTopDebug',
|
||||
path: `/${instance.lang}/${instance.theme}/doc` + '/n-back-top-debug'
|
||||
path: '/n-back-top-debug'
|
||||
},
|
||||
{
|
||||
name: 'CascaderDebug',
|
||||
path: `/${instance.lang}/${instance.theme}/doc` + '/n-cascader-debug'
|
||||
path: '/n-cascader-debug'
|
||||
},
|
||||
{
|
||||
name: 'VerticalAlignDebug',
|
||||
|
@ -13,10 +13,13 @@ import scrollbarDebug2 from '../debugComponents/scrollbarDebug2'
|
||||
|
||||
import { withPrefix } from './utils'
|
||||
|
||||
const childDebugRoutes = [
|
||||
const rootDebugRoutes = [
|
||||
{ path: '/n-popover-debug', component: popoverDebug },
|
||||
{ path: '/n-back-top-debug', component: backTopDebug },
|
||||
{ path: '/n-cascader-debug', component: cascaderDebug },
|
||||
{ path: '/n-cascader-debug', component: cascaderDebug }
|
||||
]
|
||||
|
||||
const childDebugRoutes = [
|
||||
{ path: '/n-scrollbar-debug2', component: scrollbarDebug2 },
|
||||
{ path: '/n-date-picker-debug', component: datePickerDebug },
|
||||
{ path: '/n--debug', component: suffixDebug },
|
||||
@ -31,4 +34,5 @@ const childDebugRoutes = [
|
||||
export default function debugRouteMixin (routes, childRoutes) {
|
||||
childRoutes.unshift(...withPrefix('/:lang/:theme/doc', childDebugRoutes))
|
||||
routes[0].children[1].children = childRoutes
|
||||
routes.unshift(...rootDebugRoutes)
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import VueRouter from 'vue-router'
|
||||
|
||||
export default function createRouter (Vue, routes) {
|
||||
Vue.use(VueRouter)
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
routes
|
||||
|
Loading…
x
Reference in New Issue
Block a user