From 0194e1b080528a3bda29d3c478bdd95e79089585 Mon Sep 17 00:00:00 2001 From: "songwanli2025@163.com" Date: Fri, 20 Mar 2020 18:06:21 +0800 Subject: [PATCH] modify(some debugComponents router path --- demo/init.js | 2 ++ demo/menuOptions.js | 6 +++--- demo/routes/debugRouteMixin.js | 8 ++++++-- demo/routes/router.js | 1 - 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/demo/init.js b/demo/init.js index 4e3a6149d..f20097cd7 100644 --- a/demo/init.js +++ b/demo/init.js @@ -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' diff --git a/demo/menuOptions.js b/demo/menuOptions.js index 0299a99d9..975eaa9d6 100644 --- a/demo/menuOptions.js +++ b/demo/menuOptions.js @@ -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', diff --git a/demo/routes/debugRouteMixin.js b/demo/routes/debugRouteMixin.js index 466d34949..6bda43af2 100644 --- a/demo/routes/debugRouteMixin.js +++ b/demo/routes/debugRouteMixin.js @@ -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) } diff --git a/demo/routes/router.js b/demo/routes/router.js index 752aa27a9..64fbe1ac5 100644 --- a/demo/routes/router.js +++ b/demo/routes/router.js @@ -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