From 64090d85eba8394e72488d43eb688d500065e45c Mon Sep 17 00:00:00 2001 From: shuirong Date: Thu, 13 Apr 2017 15:36:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=9C=89=E4=B8=89=E4=B8=AAEr?= =?UTF-8?q?ror,=E5=85=A8=E6=98=AF=E6=8B=BC=E5=86=99=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=EF=BC=8C=E5=B7=B2=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/backEnd/ArticleCreate.vue | 2 +- src/components/backEnd/ArticleEdit.vue | 2 +- src/routes/routes.js | 129 +++++++++++++---------- 3 files changed, 73 insertions(+), 60 deletions(-) diff --git a/src/components/backEnd/ArticleCreate.vue b/src/components/backEnd/ArticleCreate.vue index 7bc7e11..59713ab 100644 --- a/src/components/backEnd/ArticleCreate.vue +++ b/src/components/backEnd/ArticleCreate.vue @@ -42,7 +42,7 @@ import api from '../../api/index' import marked from 'marked'; import hlj from 'highlight.js' import 'highlight.js/styles/atom-one-dark.css' -import NProgress from 'NProgress' +import NProgress from 'nprogress' export default { data(){ return { diff --git a/src/components/backEnd/ArticleEdit.vue b/src/components/backEnd/ArticleEdit.vue index 911c3b5..eebaed3 100644 --- a/src/components/backEnd/ArticleEdit.vue +++ b/src/components/backEnd/ArticleEdit.vue @@ -42,7 +42,7 @@ import api from '../../api/index' import marked from 'marked'; import hlj from 'highlight.js' import 'highlight.js/styles/atom-one-dark.css' -import NProgress from 'NProgress' +import NProgress from 'nprogress' export default { data(){ return { diff --git a/src/routes/routes.js b/src/routes/routes.js index a7bfb32..3c2b4d8 100644 --- a/src/routes/routes.js +++ b/src/routes/routes.js @@ -8,66 +8,79 @@ import ClassList from '../components/backEnd/ClassList' import Home from '../components/fronted/Home'; import Front from '../components/fronted/Front'; import About from '../components/fronted/About'; -import Tags from '../components/fronted/tags'; +import Tags from '../components/fronted/Tags'; import Article from '../components/fronted/Article'; import NotFound from '../components/NotFound' export default [ - { - path:'/reg', - component:Reg, - meta:{auth:false}, - hidden:true - }, - { - path:'/', - component:Front,//这是文章页 - hidden:true, - children:[ - {path:'',redirect:'home', meta:{auth:false}}, - {path:'home',component:Home, meta:{auth:false}}, - {path:'about',component:About, meta:{auth:false}}, - {path:'tags',component:Tags, meta:{auth:false}}, - {path:'article/:id',component:Article, meta:{auth:false,scrollToTop: true}}, - ] - }, - { - path:'/login', - component:Login, - hidden:true - }, - { - // 后台路由 - path:'/admin', - component:Admin, - name:'管理面板', - iconCls: 'el-icon-message', - children:[ - { - // 文章列表单独一个组件(可以删除并且编辑,编辑的时候需要跳转到另一个路由) - path:'',hidden:true,redirect: {name:'文章管理'} - }, - { - // 文章列表单独一个组件(可以删除并且编辑,编辑的时候需要跳转到另一个路由) - path:'articleList',component:ArticleList,name:'文章管理' - }, - { - // 创建文章单独一个组件 - path:'articleCreate',component:ArticleCreate,name:'创建文章',hidden:true - }, - { - path:'articleEdit/:postId',component:ArticleEdit,hidden:true,name:"编辑文章" - }, - { - path:'classList',component:ClassList,name:'分类管理' - // 创建分类直接在分类列表里面出现弹层 - } - ] - }, - { - path:'*',component:NotFound,hidden:true - } - // + { + path: '/reg', + component: Reg, + meta: { auth: false }, + hidden: true + }, + { + path: '/', + component: Front, //这是文章页 + hidden: true, + children: [ + { path: '', redirect: 'home', meta: { auth: false } }, + { path: 'home', component: Home, meta: { auth: false } }, + { path: 'about', component: About, meta: { auth: false } }, + { path: 'tags', component: Tags, meta: { auth: false } }, + { path: 'article/:id', component: Article, meta: { auth: false, scrollToTop: true } }, + ] + }, + { + path: '/login', + component: Login, + hidden: true + }, + { + // 后台路由 + path: '/admin', + component: Admin, + name: '管理面板', + iconCls: 'el-icon-message', + children: [{ + // 文章列表单独一个组件(可以删除并且编辑,编辑的时候需要跳转到另一个路由) + path: '', + hidden: true, + redirect: { name: '文章管理' } + }, + { + // 文章列表单独一个组件(可以删除并且编辑,编辑的时候需要跳转到另一个路由) + path: 'articleList', + component: ArticleList, + name: '文章管理' + }, + { + // 创建文章单独一个组件 + path: 'articleCreate', + component: ArticleCreate, + name: '创建文章', + hidden: true + }, + { + path: 'articleEdit/:postId', + component: ArticleEdit, + hidden: true, + name: "编辑文章" + }, + { + path: 'classList', + component: ClassList, + name: '分类管理' + // 创建分类直接在分类列表里面出现弹层 + } + ] + }, + { + path: '*', + component: NotFound, + hidden: true + } + // - // {path:'/404',component:NotFound} -] + // {path:'/404',component:NotFound} +] \ No newline at end of file