diff --git a/src/icons/index.js b/src/icons/index.js
index 5b20f849..d850a9c3 100644
--- a/src/icons/index.js
+++ b/src/icons/index.js
@@ -1,10 +1,12 @@
import Vue from 'vue'
import IconSvg from '@/components/Icon-svg'// svg组件
-
+import generateIconsView from '@/views/svg-icons/generateIconsView.js'// just for views/icons , you can delete it
// register globally
Vue.component('icon-svg', IconSvg)
const requireAll = requireContext => requireContext.keys().map(requireContext)
const req = require.context('./svg', false, /\.svg$/)
-requireAll(req)
+const iconMap = requireAll(req)
+console.log(generateIconsView)
+generateIconsView.generate(iconMap) // just for views/icons , you can delete it
diff --git a/src/icons/svg/icons.svg b/src/icons/svg/icons.svg
new file mode 100644
index 00000000..906af96a
--- /dev/null
+++ b/src/icons/svg/icons.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 407acc7a..d4d504be 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -55,6 +55,13 @@ export const asyncRouterMap = [
noDropdown: true,
children: [{ path: 'index', component: _import('permission/index'), name: '权限测试页', meta: { role: ['admin'] }}]
},
+ {
+ path: '/icon',
+ component: Layout,
+ icon: 'icons',
+ noDropdown: true,
+ children: [{ path: 'index', component: _import('svg-icons/index'), name: 'icons' }]
+ },
{
path: '/components',
component: Layout,
diff --git a/src/views/svg-icons/generateIconsView.js b/src/views/svg-icons/generateIconsView.js
new file mode 100644
index 00000000..a3458b2e
--- /dev/null
+++ b/src/views/svg-icons/generateIconsView.js
@@ -0,0 +1,10 @@
+const data = {
+ state: {
+ iconsMap: []
+ },
+ generate(iconsMap) {
+ this.state.iconsMap = iconsMap
+ }
+}
+
+export default data
diff --git a/src/views/svg-icons/index.vue b/src/views/svg-icons/index.vue
new file mode 100644
index 00000000..e0233f98
--- /dev/null
+++ b/src/views/svg-icons/index.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+