From 69bd4da00990d156731abe4691d44405de755f09 Mon Sep 17 00:00:00 2001 From: Cat73 Date: Tue, 10 Mar 2020 14:09:51 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E8=8F=9C=E5=8D=95=E4=B8=8A?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BD=BF=E7=94=A8=20el-icon=20=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ElIcon/index.vue | 39 +++++++++++++++++++ src/icons/index.js | 2 + src/layout/components/Sidebar/Item.vue | 12 +++++- src/layout/components/Sidebar/SidebarItem.vue | 4 +- src/styles/sidebar.scss | 13 +++++++ 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 src/components/ElIcon/index.vue diff --git a/src/components/ElIcon/index.vue b/src/components/ElIcon/index.vue new file mode 100644 index 00000000..cc67a306 --- /dev/null +++ b/src/components/ElIcon/index.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/icons/index.js b/src/icons/index.js index 2c6b309c..3ea4bb40 100644 --- a/src/icons/index.js +++ b/src/icons/index.js @@ -1,8 +1,10 @@ import Vue from 'vue' import SvgIcon from '@/components/SvgIcon'// svg component +import ElIcon from '@/components/ElIcon' // register globally Vue.component('svg-icon', SvgIcon) +Vue.component('el-icon', ElIcon) const req = require.context('./svg', false, /\.svg$/) const requireAll = requireContext => requireContext.keys().map(requireContext) diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f615..9302d919 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,4 +1,6 @@