From 6a08c79bfb405aeb4163ae468f0f64393cd2d354 Mon Sep 17 00:00:00 2001 From: Tuan Duong Date: Wed, 17 Apr 2019 00:01:24 +0700 Subject: [PATCH 1/2] Change views/icons path - Icons view includes 2 small views: svg-icons and element-icons --- src/router/index.js | 2 +- src/views/icons/element-icons.js | 74 +++++++++++++++++++ src/views/{svg-icons => icons}/index.vue | 10 +-- .../require-icons.js => icons/svg-icons.js} | 4 +- src/views/svg-icons/element-icon.json | 1 - 5 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 src/views/icons/element-icons.js rename src/views/{svg-icons => icons}/index.vue (90%) rename src/views/{svg-icons/require-icons.js => icons/svg-icons.js} (72%) delete mode 100644 src/views/svg-icons/element-icon.json diff --git a/src/router/index.js b/src/router/index.js index 0c5973da..34afd5c5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -163,7 +163,7 @@ export const asyncRoutes = [ children: [ { path: 'index', - component: () => import('@/views/svg-icons/index'), + component: () => import('@/views/icons/index'), name: 'Icons', meta: { title: 'icons', icon: 'icon', noCache: true } } diff --git a/src/views/icons/element-icons.js b/src/views/icons/element-icons.js new file mode 100644 index 00000000..df722010 --- /dev/null +++ b/src/views/icons/element-icons.js @@ -0,0 +1,74 @@ +const elementIcons = [ + 'info', + 'error', + 'success', + 'warning', + 'question', + 'back', + 'arrow-left', + 'arrow-down', + 'arrow-right', + 'arrow-up', + 'caret-left', + 'caret-bottom', + 'caret-top', + 'caret-right', + 'd-arrow-left', + 'd-arrow-right', + 'minus', + 'plus', + 'remove', + 'circle-plus', + 'remove-outline', + 'circle-plus-outline', + 'close', + 'check', + 'circle-close', + 'circle-check', + 'circle-close-outline', + 'circle-check-outline', + 'zoom-out', + 'zoom-in', + 'd-caret', + 'sort', + 'sort-down', + 'sort-up', + 'tickets', + 'document', + 'goods', + 'sold-out', + 'news', + 'message', + 'date', + 'printer', + 'time', + 'bell', + 'mobile-phone', + 'service', + 'view', + 'menu', + 'more', + 'more-outline', + 'star-on', + 'star-off', + 'location', + 'location-outline', + 'phone', + 'phone-outline', + 'picture', + 'picture-outline', + 'delete', + 'search', + 'edit', + 'edit-outline', + 'rank', + 'refresh', + 'share', + 'setting', + 'upload', + 'upload2', + 'download', + 'loading' +] + +export default elementIcons diff --git a/src/views/svg-icons/index.vue b/src/views/icons/index.vue similarity index 90% rename from src/views/svg-icons/index.vue rename to src/views/icons/index.vue index 2715b5ea..3677afd6 100644 --- a/src/views/svg-icons/index.vue +++ b/src/views/icons/index.vue @@ -6,7 +6,7 @@ -
+
{{ generateIconCode(item) }} @@ -37,15 +37,15 @@