From 151edb3b077ad06ee45f1f711931aa075ae01031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=89=E6=9D=A5=E6=8A=80=E6=9C=AF?= <1490493387@qq.com> Date: Wed, 24 Nov 2021 23:56:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=BC=95=E5=85=A5svg-sprite-loader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + src/components/SvgIcon/index.vue | 62 ------------------------------- src/icons/index.ts | 50 +++++++++++++++++++++++++ src/icons/index.vue | 37 ++++++++++++++++++ src/icons/svg/404.svg | 1 + src/icons/svg/await.svg | 1 + src/icons/svg/bug.svg | 1 + src/icons/svg/build.svg | 1 + src/icons/svg/button.svg | 1 + src/icons/svg/cascader.svg | 1 + src/icons/svg/chart.svg | 1 + src/icons/svg/checkbox.svg | 1 + src/icons/svg/clipboard.svg | 1 + src/icons/svg/code.svg | 1 + src/icons/svg/color.svg | 1 + src/icons/svg/component.svg | 1 + src/icons/svg/dashboard.svg | 1 + src/icons/svg/date-range.svg | 1 + src/icons/svg/date.svg | 1 + src/icons/svg/dict.svg | 1 + src/icons/svg/documentation.svg | 1 + src/icons/svg/download.svg | 1 + src/icons/svg/drag.svg | 1 + src/icons/svg/druid.svg | 1 + src/icons/svg/edit.svg | 1 + src/icons/svg/education.svg | 1 + src/icons/svg/email.svg | 1 + src/icons/svg/example.svg | 1 + src/icons/svg/excel.svg | 1 + src/icons/svg/exit-fullscreen.svg | 1 + src/icons/svg/eye-open.svg | 1 + src/icons/svg/eye.svg | 1 + src/icons/svg/form.svg | 1 + src/icons/svg/fullscreen.svg | 1 + src/icons/svg/github.svg | 1 + src/icons/svg/guide.svg | 1 + src/icons/svg/icon.svg | 1 + src/icons/svg/input.svg | 1 + src/icons/svg/international.svg | 1 + src/icons/svg/ip.svg | 1 + src/icons/svg/job.svg | 1 + src/icons/svg/language.svg | 1 + src/icons/svg/link.svg | 1 + src/icons/svg/list.svg | 1 + src/icons/svg/lock.svg | 1 + src/icons/svg/log.svg | 1 + src/icons/svg/logininfor.svg | 1 + src/icons/svg/menu.svg | 1 + src/icons/svg/message.svg | 1 + src/icons/svg/money.svg | 1 + src/icons/svg/monitor.svg | 2 + src/icons/svg/nested.svg | 1 + src/icons/svg/nodata.svg | 1 + src/icons/svg/number.svg | 1 + src/icons/svg/offline.svg | 1 + src/icons/svg/online.svg | 1 + src/icons/svg/password.svg | 1 + src/icons/svg/pdf.svg | 1 + src/icons/svg/people.svg | 1 + src/icons/svg/peoples.svg | 1 + src/icons/svg/phone.svg | 1 + src/icons/svg/post.svg | 1 + src/icons/svg/qq.svg | 1 + src/icons/svg/question.svg | 1 + src/icons/svg/radio.svg | 1 + src/icons/svg/rate.svg | 1 + src/icons/svg/redis.svg | 1 + src/icons/svg/route.svg | 1 + src/icons/svg/row.svg | 1 + src/icons/svg/search.svg | 1 + src/icons/svg/select.svg | 1 + src/icons/svg/server.svg | 1 + src/icons/svg/shopping.svg | 1 + src/icons/svg/size.svg | 1 + src/icons/svg/skill.svg | 1 + src/icons/svg/slider.svg | 1 + src/icons/svg/star.svg | 1 + src/icons/svg/swagger.svg | 1 + src/icons/svg/switch.svg | 1 + src/icons/svg/system.svg | 2 + src/icons/svg/tab.svg | 1 + src/icons/svg/table.svg | 1 + src/icons/svg/textarea.svg | 1 + src/icons/svg/theme.svg | 1 + src/icons/svg/time-range.svg | 1 + src/icons/svg/time.svg | 1 + src/icons/svg/tool.svg | 1 + src/icons/svg/tree-table.svg | 1 + src/icons/svg/tree.svg | 1 + src/icons/svg/upload.svg | 1 + src/icons/svg/user.svg | 1 + src/icons/svg/validCode.svg | 1 + src/icons/svg/wechat.svg | 1 + src/icons/svg/zip.svg | 1 + src/main.ts | 4 ++ src/views/dashboard/index.vue | 2 +- vite.config.ts | 8 +++- 97 files changed, 192 insertions(+), 65 deletions(-) delete mode 100644 src/components/SvgIcon/index.vue create mode 100644 src/icons/index.ts create mode 100644 src/icons/index.vue create mode 100644 src/icons/svg/404.svg create mode 100644 src/icons/svg/await.svg create mode 100644 src/icons/svg/bug.svg create mode 100644 src/icons/svg/build.svg create mode 100644 src/icons/svg/button.svg create mode 100644 src/icons/svg/cascader.svg create mode 100644 src/icons/svg/chart.svg create mode 100644 src/icons/svg/checkbox.svg create mode 100644 src/icons/svg/clipboard.svg create mode 100644 src/icons/svg/code.svg create mode 100644 src/icons/svg/color.svg create mode 100644 src/icons/svg/component.svg create mode 100644 src/icons/svg/dashboard.svg create mode 100644 src/icons/svg/date-range.svg create mode 100644 src/icons/svg/date.svg create mode 100644 src/icons/svg/dict.svg create mode 100644 src/icons/svg/documentation.svg create mode 100644 src/icons/svg/download.svg create mode 100644 src/icons/svg/drag.svg create mode 100644 src/icons/svg/druid.svg create mode 100644 src/icons/svg/edit.svg create mode 100644 src/icons/svg/education.svg create mode 100644 src/icons/svg/email.svg create mode 100644 src/icons/svg/example.svg create mode 100644 src/icons/svg/excel.svg create mode 100644 src/icons/svg/exit-fullscreen.svg create mode 100644 src/icons/svg/eye-open.svg create mode 100644 src/icons/svg/eye.svg create mode 100644 src/icons/svg/form.svg create mode 100644 src/icons/svg/fullscreen.svg create mode 100644 src/icons/svg/github.svg create mode 100644 src/icons/svg/guide.svg create mode 100644 src/icons/svg/icon.svg create mode 100644 src/icons/svg/input.svg create mode 100644 src/icons/svg/international.svg create mode 100644 src/icons/svg/ip.svg create mode 100644 src/icons/svg/job.svg create mode 100644 src/icons/svg/language.svg create mode 100644 src/icons/svg/link.svg create mode 100644 src/icons/svg/list.svg create mode 100644 src/icons/svg/lock.svg create mode 100644 src/icons/svg/log.svg create mode 100644 src/icons/svg/logininfor.svg create mode 100644 src/icons/svg/menu.svg create mode 100644 src/icons/svg/message.svg create mode 100644 src/icons/svg/money.svg create mode 100644 src/icons/svg/monitor.svg create mode 100644 src/icons/svg/nested.svg create mode 100644 src/icons/svg/nodata.svg create mode 100644 src/icons/svg/number.svg create mode 100644 src/icons/svg/offline.svg create mode 100644 src/icons/svg/online.svg create mode 100644 src/icons/svg/password.svg create mode 100644 src/icons/svg/pdf.svg create mode 100644 src/icons/svg/people.svg create mode 100644 src/icons/svg/peoples.svg create mode 100644 src/icons/svg/phone.svg create mode 100644 src/icons/svg/post.svg create mode 100644 src/icons/svg/qq.svg create mode 100644 src/icons/svg/question.svg create mode 100644 src/icons/svg/radio.svg create mode 100644 src/icons/svg/rate.svg create mode 100644 src/icons/svg/redis.svg create mode 100644 src/icons/svg/route.svg create mode 100644 src/icons/svg/row.svg create mode 100644 src/icons/svg/search.svg create mode 100644 src/icons/svg/select.svg create mode 100644 src/icons/svg/server.svg create mode 100644 src/icons/svg/shopping.svg create mode 100644 src/icons/svg/size.svg create mode 100644 src/icons/svg/skill.svg create mode 100644 src/icons/svg/slider.svg create mode 100644 src/icons/svg/star.svg create mode 100644 src/icons/svg/swagger.svg create mode 100644 src/icons/svg/switch.svg create mode 100644 src/icons/svg/system.svg create mode 100644 src/icons/svg/tab.svg create mode 100644 src/icons/svg/table.svg create mode 100644 src/icons/svg/textarea.svg create mode 100644 src/icons/svg/theme.svg create mode 100644 src/icons/svg/time-range.svg create mode 100644 src/icons/svg/time.svg create mode 100644 src/icons/svg/tool.svg create mode 100644 src/icons/svg/tree-table.svg create mode 100644 src/icons/svg/tree.svg create mode 100644 src/icons/svg/upload.svg create mode 100644 src/icons/svg/user.svg create mode 100644 src/icons/svg/validCode.svg create mode 100644 src/icons/svg/wechat.svg create mode 100644 src/icons/svg/zip.svg diff --git a/package.json b/package.json index 99bfd117..39c54bf8 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "dependencies": { "axios": "^0.24.0", "element-plus": "^1.2.0-beta.3", + "fs": "0.0.1-security", "path-to-regexp": "^6.2.0", "screenfull": "^6.0.0", "vue": "^3.2.16", @@ -20,6 +21,7 @@ "@types/nprogress": "^0.2.0", "@vitejs/plugin-vue": "^1.9.3", "sass": "^1.43.4", + "svg-sprite-loader": "^6.0.11", "typescript": "^4.4.3", "vite": "^2.6.4", "vue-tsc": "^0.3.0" diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue deleted file mode 100644 index b07ded2a..00000000 --- a/src/components/SvgIcon/index.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - diff --git a/src/icons/index.ts b/src/icons/index.ts new file mode 100644 index 00000000..95b675b4 --- /dev/null +++ b/src/icons/index.ts @@ -0,0 +1,50 @@ +import { readFileSync, readdirSync } from 'fs' + +let idPrefix = '' +const svgTitle = /', '') + arr.push(svg) + } + } + return arr +} + +// 生成svg +export const createSvg = (path: any, prefix = 'icon') => { + if (path === '') return + idPrefix = prefix + const res = svgFind(path) + return { + name: 'svg-transform', + transformIndexHtml(dom: String) { + return dom.replace( + '
', + `` + ) + } + } +} \ No newline at end of file diff --git a/src/icons/index.vue b/src/icons/index.vue new file mode 100644 index 00000000..5e979c4f --- /dev/null +++ b/src/icons/index.vue @@ -0,0 +1,37 @@ + + + + + + + diff --git a/src/icons/svg/404.svg b/src/icons/svg/404.svg new file mode 100644 index 00000000..6df50190 --- /dev/null +++ b/src/icons/svg/404.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/await.svg b/src/icons/svg/await.svg new file mode 100644 index 00000000..fcec2ecb --- /dev/null +++ b/src/icons/svg/await.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/bug.svg b/src/icons/svg/bug.svg new file mode 100644 index 00000000..05a150dc --- /dev/null +++ b/src/icons/svg/bug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/build.svg b/src/icons/svg/build.svg new file mode 100644 index 00000000..97c46886 --- /dev/null +++ b/src/icons/svg/build.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/button.svg b/src/icons/svg/button.svg new file mode 100644 index 00000000..b6c7cc0b --- /dev/null +++ b/src/icons/svg/button.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/cascader.svg b/src/icons/svg/cascader.svg new file mode 100644 index 00000000..e256024f --- /dev/null +++ b/src/icons/svg/cascader.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/chart.svg b/src/icons/svg/chart.svg new file mode 100644 index 00000000..27728fb0 --- /dev/null +++ b/src/icons/svg/chart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/checkbox.svg b/src/icons/svg/checkbox.svg new file mode 100644 index 00000000..013fd3a2 --- /dev/null +++ b/src/icons/svg/checkbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/clipboard.svg b/src/icons/svg/clipboard.svg new file mode 100644 index 00000000..90923ff6 --- /dev/null +++ b/src/icons/svg/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/code.svg b/src/icons/svg/code.svg new file mode 100644 index 00000000..ed4d23cf --- /dev/null +++ b/src/icons/svg/code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/color.svg b/src/icons/svg/color.svg new file mode 100644 index 00000000..44a81aab --- /dev/null +++ b/src/icons/svg/color.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/component.svg b/src/icons/svg/component.svg new file mode 100644 index 00000000..29c34580 --- /dev/null +++ b/src/icons/svg/component.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/dashboard.svg b/src/icons/svg/dashboard.svg new file mode 100644 index 00000000..5317d370 --- /dev/null +++ b/src/icons/svg/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/date-range.svg b/src/icons/svg/date-range.svg new file mode 100644 index 00000000..fda571e7 --- /dev/null +++ b/src/icons/svg/date-range.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/date.svg b/src/icons/svg/date.svg new file mode 100644 index 00000000..52dc73ee --- /dev/null +++ b/src/icons/svg/date.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/dict.svg b/src/icons/svg/dict.svg new file mode 100644 index 00000000..48493773 --- /dev/null +++ b/src/icons/svg/dict.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/documentation.svg b/src/icons/svg/documentation.svg new file mode 100644 index 00000000..70431228 --- /dev/null +++ b/src/icons/svg/documentation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/download.svg b/src/icons/svg/download.svg new file mode 100644 index 00000000..c8969513 --- /dev/null +++ b/src/icons/svg/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/drag.svg b/src/icons/svg/drag.svg new file mode 100644 index 00000000..4185d3ce --- /dev/null +++ b/src/icons/svg/drag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/druid.svg b/src/icons/svg/druid.svg new file mode 100644 index 00000000..a2b4b4ed --- /dev/null +++ b/src/icons/svg/druid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/edit.svg b/src/icons/svg/edit.svg new file mode 100644 index 00000000..d26101f2 --- /dev/null +++ b/src/icons/svg/edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/education.svg b/src/icons/svg/education.svg new file mode 100644 index 00000000..7bfb01d1 --- /dev/null +++ b/src/icons/svg/education.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/email.svg b/src/icons/svg/email.svg new file mode 100644 index 00000000..74d25e21 --- /dev/null +++ b/src/icons/svg/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/example.svg b/src/icons/svg/example.svg new file mode 100644 index 00000000..46f42b53 --- /dev/null +++ b/src/icons/svg/example.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/excel.svg b/src/icons/svg/excel.svg new file mode 100644 index 00000000..74d97b80 --- /dev/null +++ b/src/icons/svg/excel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/exit-fullscreen.svg b/src/icons/svg/exit-fullscreen.svg new file mode 100644 index 00000000..485c128b --- /dev/null +++ b/src/icons/svg/exit-fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/eye-open.svg b/src/icons/svg/eye-open.svg new file mode 100644 index 00000000..88dcc98e --- /dev/null +++ b/src/icons/svg/eye-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/eye.svg b/src/icons/svg/eye.svg new file mode 100644 index 00000000..16ed2d87 --- /dev/null +++ b/src/icons/svg/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/form.svg b/src/icons/svg/form.svg new file mode 100644 index 00000000..9ab55a03 --- /dev/null +++ b/src/icons/svg/form.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/fullscreen.svg b/src/icons/svg/fullscreen.svg new file mode 100644 index 00000000..0e86b6fa --- /dev/null +++ b/src/icons/svg/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/github.svg b/src/icons/svg/github.svg new file mode 100644 index 00000000..db0a0d43 --- /dev/null +++ b/src/icons/svg/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/guide.svg b/src/icons/svg/guide.svg new file mode 100644 index 00000000..b2710017 --- /dev/null +++ b/src/icons/svg/guide.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon.svg b/src/icons/svg/icon.svg new file mode 100644 index 00000000..82be8eee --- /dev/null +++ b/src/icons/svg/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/input.svg b/src/icons/svg/input.svg new file mode 100644 index 00000000..ab91381e --- /dev/null +++ b/src/icons/svg/input.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/international.svg b/src/icons/svg/international.svg new file mode 100644 index 00000000..e9b56eee --- /dev/null +++ b/src/icons/svg/international.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/ip.svg b/src/icons/svg/ip.svg new file mode 100644 index 00000000..e59f29b3 --- /dev/null +++ b/src/icons/svg/ip.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/job.svg b/src/icons/svg/job.svg new file mode 100644 index 00000000..2a93a251 --- /dev/null +++ b/src/icons/svg/job.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/language.svg b/src/icons/svg/language.svg new file mode 100644 index 00000000..0082b577 --- /dev/null +++ b/src/icons/svg/language.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/link.svg b/src/icons/svg/link.svg new file mode 100644 index 00000000..48197ba4 --- /dev/null +++ b/src/icons/svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/list.svg b/src/icons/svg/list.svg new file mode 100644 index 00000000..20259edd --- /dev/null +++ b/src/icons/svg/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/lock.svg b/src/icons/svg/lock.svg new file mode 100644 index 00000000..74fee543 --- /dev/null +++ b/src/icons/svg/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/log.svg b/src/icons/svg/log.svg new file mode 100644 index 00000000..d879d33b --- /dev/null +++ b/src/icons/svg/log.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/logininfor.svg b/src/icons/svg/logininfor.svg new file mode 100644 index 00000000..267f8447 --- /dev/null +++ b/src/icons/svg/logininfor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/menu.svg b/src/icons/svg/menu.svg new file mode 100644 index 00000000..719c78dc --- /dev/null +++ b/src/icons/svg/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/message.svg b/src/icons/svg/message.svg new file mode 100644 index 00000000..14ca8172 --- /dev/null +++ b/src/icons/svg/message.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/money.svg b/src/icons/svg/money.svg new file mode 100644 index 00000000..5b5e4ee8 --- /dev/null +++ b/src/icons/svg/money.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 00000000..bc308cb0 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/icons/svg/nested.svg b/src/icons/svg/nested.svg new file mode 100644 index 00000000..06713a86 --- /dev/null +++ b/src/icons/svg/nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/nodata.svg b/src/icons/svg/nodata.svg new file mode 100644 index 00000000..56a45183 --- /dev/null +++ b/src/icons/svg/nodata.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/number.svg b/src/icons/svg/number.svg new file mode 100644 index 00000000..ad5ce9af --- /dev/null +++ b/src/icons/svg/number.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/offline.svg b/src/icons/svg/offline.svg new file mode 100644 index 00000000..d09cb16c --- /dev/null +++ b/src/icons/svg/offline.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/online.svg b/src/icons/svg/online.svg new file mode 100644 index 00000000..330a2029 --- /dev/null +++ b/src/icons/svg/online.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/password.svg b/src/icons/svg/password.svg new file mode 100644 index 00000000..6c64defe --- /dev/null +++ b/src/icons/svg/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/pdf.svg b/src/icons/svg/pdf.svg new file mode 100644 index 00000000..957aa0cc --- /dev/null +++ b/src/icons/svg/pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/people.svg b/src/icons/svg/people.svg new file mode 100644 index 00000000..2bd54aeb --- /dev/null +++ b/src/icons/svg/people.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/peoples.svg b/src/icons/svg/peoples.svg new file mode 100644 index 00000000..907404cd --- /dev/null +++ b/src/icons/svg/peoples.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/phone.svg b/src/icons/svg/phone.svg new file mode 100644 index 00000000..ab8e8c4e --- /dev/null +++ b/src/icons/svg/phone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/post.svg b/src/icons/svg/post.svg new file mode 100644 index 00000000..2922c613 --- /dev/null +++ b/src/icons/svg/post.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/qq.svg b/src/icons/svg/qq.svg new file mode 100644 index 00000000..ee13d4ec --- /dev/null +++ b/src/icons/svg/qq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/question.svg b/src/icons/svg/question.svg new file mode 100644 index 00000000..cf75bd4b --- /dev/null +++ b/src/icons/svg/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/radio.svg b/src/icons/svg/radio.svg new file mode 100644 index 00000000..0cde3452 --- /dev/null +++ b/src/icons/svg/radio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/rate.svg b/src/icons/svg/rate.svg new file mode 100644 index 00000000..aa3b14d7 --- /dev/null +++ b/src/icons/svg/rate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/redis.svg b/src/icons/svg/redis.svg new file mode 100644 index 00000000..2f1d62df --- /dev/null +++ b/src/icons/svg/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 00000000..b2071244 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/row.svg b/src/icons/svg/row.svg new file mode 100644 index 00000000..07809922 --- /dev/null +++ b/src/icons/svg/row.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/search.svg b/src/icons/svg/search.svg new file mode 100644 index 00000000..84233dda --- /dev/null +++ b/src/icons/svg/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/select.svg b/src/icons/svg/select.svg new file mode 100644 index 00000000..d6283828 --- /dev/null +++ b/src/icons/svg/select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/server.svg b/src/icons/svg/server.svg new file mode 100644 index 00000000..ca37b001 --- /dev/null +++ b/src/icons/svg/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/shopping.svg b/src/icons/svg/shopping.svg new file mode 100644 index 00000000..87513e7c --- /dev/null +++ b/src/icons/svg/shopping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/size.svg b/src/icons/svg/size.svg new file mode 100644 index 00000000..ddb25b8d --- /dev/null +++ b/src/icons/svg/size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/skill.svg b/src/icons/svg/skill.svg new file mode 100644 index 00000000..a3b73121 --- /dev/null +++ b/src/icons/svg/skill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/slider.svg b/src/icons/svg/slider.svg new file mode 100644 index 00000000..fbe4f39f --- /dev/null +++ b/src/icons/svg/slider.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/star.svg b/src/icons/svg/star.svg new file mode 100644 index 00000000..6cf86e66 --- /dev/null +++ b/src/icons/svg/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/swagger.svg b/src/icons/svg/swagger.svg new file mode 100644 index 00000000..05d4e7bc --- /dev/null +++ b/src/icons/svg/swagger.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/switch.svg b/src/icons/svg/switch.svg new file mode 100644 index 00000000..0ba61e38 --- /dev/null +++ b/src/icons/svg/switch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/system.svg b/src/icons/svg/system.svg new file mode 100644 index 00000000..dba28cf6 --- /dev/null +++ b/src/icons/svg/system.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/icons/svg/tab.svg b/src/icons/svg/tab.svg new file mode 100644 index 00000000..b4b48e48 --- /dev/null +++ b/src/icons/svg/tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/table.svg b/src/icons/svg/table.svg new file mode 100644 index 00000000..0e3dc9de --- /dev/null +++ b/src/icons/svg/table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/textarea.svg b/src/icons/svg/textarea.svg new file mode 100644 index 00000000..2709f292 --- /dev/null +++ b/src/icons/svg/textarea.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/theme.svg b/src/icons/svg/theme.svg new file mode 100644 index 00000000..5982a2f7 --- /dev/null +++ b/src/icons/svg/theme.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time-range.svg b/src/icons/svg/time-range.svg new file mode 100644 index 00000000..13c1202b --- /dev/null +++ b/src/icons/svg/time-range.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 00000000..b376e32a --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/tool.svg b/src/icons/svg/tool.svg new file mode 100644 index 00000000..c813067e --- /dev/null +++ b/src/icons/svg/tool.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/tree-table.svg b/src/icons/svg/tree-table.svg new file mode 100644 index 00000000..8aafdb82 --- /dev/null +++ b/src/icons/svg/tree-table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/tree.svg b/src/icons/svg/tree.svg new file mode 100644 index 00000000..dd4b7dd2 --- /dev/null +++ b/src/icons/svg/tree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/upload.svg b/src/icons/svg/upload.svg new file mode 100644 index 00000000..bae49c0a --- /dev/null +++ b/src/icons/svg/upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/user.svg b/src/icons/svg/user.svg new file mode 100644 index 00000000..0ba0716a --- /dev/null +++ b/src/icons/svg/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/validCode.svg b/src/icons/svg/validCode.svg new file mode 100644 index 00000000..cfb10214 --- /dev/null +++ b/src/icons/svg/validCode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/wechat.svg b/src/icons/svg/wechat.svg new file mode 100644 index 00000000..c586e551 --- /dev/null +++ b/src/icons/svg/wechat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/zip.svg b/src/icons/svg/zip.svg new file mode 100644 index 00000000..f806fc48 --- /dev/null +++ b/src/icons/svg/zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 1c5ea85f..26f3d8b9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,8 +7,12 @@ import '@styles/index.scss' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' + +import SvgIcon from './icons/index.vue' + const app=createApp(App) app + .component('svg-icon', SvgIcon) .use(router) .use(store,key) .use(ElementPlus) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 850650c3..44844e01 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,5 +1,5 @@ - 这里是控制台 +