From 5b9bd27255c374b0175c2efc898090aa879bb207 Mon Sep 17 00:00:00 2001 From: pnfygqivr Date: Sun, 30 Apr 2023 09:29:12 +0800 Subject: [PATCH] ADD file via upload --- vueblog/src/router/index.js | 103 ++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 vueblog/src/router/index.js diff --git a/vueblog/src/router/index.js b/vueblog/src/router/index.js new file mode 100644 index 0000000..7a2ea26 --- /dev/null +++ b/vueblog/src/router/index.js @@ -0,0 +1,103 @@ +import Vue from 'vue' +import Router from 'vue-router' +import Login from '@/components/Login' +import Home from '@/components/Home' +import ArticleList from '@/components/ArticleList' +import CateMana from '@/components/CateMana' +import DataCharts from '@/components/DataCharts' +import PostArticle from '@/components/PostArticle' +import UserMana from '@/components/UserMana' +import BlogDetail from '@/components/BlogDetail' + +Vue.use(Router) + +export default new Router({ + routes: [ + { + path: '/', + name: '登录', + hidden: true, + component: Login + }, { + path: '/home', + name: '', + component: Home, + hidden: true + }, { + path: '/home', + component: Home, + name: '文章管理', + iconCls: 'fa fa-file-text-o', + children: [ + { + path: '/articleList', + name: '文章列表', + component: ArticleList, + meta: { + keepAlive: true + } + }, { + path: '/postArticle', + name: '发表文章', + component: PostArticle, + meta: { + keepAlive: false + } + }, { + path: '/blogDetail', + name: '博客详情', + component: BlogDetail, + hidden: true, + meta: { + keepAlive: false + } + }, { + path: '/editBlog', + name: '编辑博客', + component: PostArticle, + hidden: true, + meta: { + keepAlive: false + } + } + ] + }, { + path: '/home', + component: Home, + name: '用户管理', + children: [ + { + path: '/user', + iconCls: 'fa fa-user-o', + name: '用户管理', + component: UserMana + } + ] + }, { + path: '/home', + component: Home, + name: '栏目管理', + children: [ + { + path: '/cateMana', + iconCls: 'fa fa-reorder', + name: '栏目管理', + component: CateMana + } + ] + }, { + path: '/home', + component: Home, + name: '数据统计', + iconCls: 'fa fa-bar-chart', + children: [ + { + path: '/charts', + iconCls: 'fa fa-bar-chart', + name: '数据统计', + component: DataCharts + } + ] + } + ] +})