From 61394e573eaacdeb61289bde58121991c100739c Mon Sep 17 00:00:00 2001 From: Pan Date: Fri, 24 Aug 2018 10:42:37 +0800 Subject: [PATCH] feature: [sidebar] add external-link --- src/icons/svg/link.svg | 1 + src/router/index.js | 11 ++++++ src/views/layout/components/Sidebar/Item.vue | 29 +++++++++++++++ .../layout/components/Sidebar/SidebarItem.vue | 35 ++++++++++++------- 4 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 src/icons/svg/link.svg create mode 100644 src/views/layout/components/Sidebar/Item.vue diff --git a/src/icons/svg/link.svg b/src/icons/svg/link.svg new file mode 100644 index 0000000..11037e6 --- /dev/null +++ b/src/icons/svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 9897812..18ff683 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -130,6 +130,17 @@ export const constantRouterMap = [ ] }, + { + path: 'external-link', + component: Layout, + children: [ + { + path: 'https://panjiachen.github.io/vue-element-admin-site/#/', + meta: { title: 'externalLink', icon: 'link' } + } + ] + }, + { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/views/layout/components/Sidebar/Item.vue b/src/views/layout/components/Sidebar/Item.vue new file mode 100644 index 0000000..b515f61 --- /dev/null +++ b/src/views/layout/components/Sidebar/Item.vue @@ -0,0 +1,29 @@ + diff --git a/src/views/layout/components/Sidebar/SidebarItem.vue b/src/views/layout/components/Sidebar/SidebarItem.vue index 044b9fa..d95720e 100644 --- a/src/views/layout/components/Sidebar/SidebarItem.vue +++ b/src/views/layout/components/Sidebar/SidebarItem.vue @@ -1,17 +1,23 @@