MMF-FE / svgicon

SVG icon components and tool set
https://mmf-fe.github.io/svgicon
MIT License
922 stars 95 forks source link

svg not displayed: iconData null #45

Closed plweil closed 6 years ago

plweil commented 6 years ago

The icons are not being displayed. Using this script, I've got the compiled svgs in src/compiled-icons:

 "generate-icons": "vsvg -s ./svg-icons -t ./src/compiled-icons"

When viewed in DevTools, the svg-icon component's iconData computed property is null, which suggests that it doesn't know where the icons are. Do I have to explicitly import each individual icon (or the entire icon directory)?

Allenice commented 6 years ago

You should import generated icons. Please view: https://github.com/MMF-FE/vue-svgicon#use-generated-icon