diff --git a/mock/role/routes.ts b/mock/role/routes.ts index 9301223a1..e335cc149 100644 --- a/mock/role/routes.ts +++ b/mock/role/routes.ts @@ -119,7 +119,7 @@ export const asyncRoutes = [ children: [ { path: 'index', - component: 'views/svg-icons/index', + component: 'views/icons/index', name: 'Icons', meta: { title: 'icons', icon: 'icon', noCache: true } } diff --git a/src/router/index.ts b/src/router/index.ts index 58336e54a..b4bb2634f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -162,7 +162,7 @@ export const asyncRoutes: RouteConfig[] = [ children: [ { path: 'index', - component: () => import(/* webpackChunkName: "icons" */ '@/views/svg-icons/index.vue'), + component: () => import(/* webpackChunkName: "icons" */ '@/views/icons/index.vue'), name: 'Icons', meta: { title: 'icons', icon: 'icon', noCache: true } } diff --git a/src/views/icons/elementIcons.ts b/src/views/icons/elementIcons.ts new file mode 100644 index 000000000..e8074a16f --- /dev/null +++ b/src/views/icons/elementIcons.ts @@ -0,0 +1,74 @@ +// Full list here: https://element.eleme.io/#/en-US/component/icon + +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', + '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/icons/index.vue b/src/views/icons/index.vue new file mode 100644 index 000000000..6fc4b1429 --- /dev/null +++ b/src/views/icons/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ generateSvgIconCode(item) }} + + + + {{ item }} + + + + + + + + + {{ generateElementIconCode(item) }} + + + + {{ item }} + + + + + + + + + + + diff --git a/src/views/svg-icons/requireIcons.ts b/src/views/icons/svgIcons.ts similarity index 100% rename from src/views/svg-icons/requireIcons.ts rename to src/views/icons/svgIcons.ts diff --git a/src/views/svg-icons/index.vue b/src/views/svg-icons/index.vue deleted file mode 100644 index 906b1a8cc..000000000 --- a/src/views/svg-icons/index.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - Add and use - - - - - - - {{ generateIconCode(item) }} - - - - {{ item }} - - - - - - - - - -
- Add and use - -