MMF-FE / svgicon

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

empty svg #70

Closed erwanpoupard closed 5 years ago

erwanpoupard commented 5 years ago

Hello, all works fine except for one SVG :

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="64"/><circle cx="256" cy="448" r="64"/><circle cx="256" cy="64" r="64"/></svg>

my component is well generate

var icon = require('vue-svgicon')
icon.register({
  menu: {
    width: 16,
    height: 16,
    viewBox: '0 0 512 512',
    data:
      '<circle pid="0" cx="256" cy="256" r="64"/><circle pid="1" cx="256" cy="448" r="64"/><circle pid="2" cx="256" cy="64" r="64"/>'
  }
})

but when i use this component in my app, the svg is empty :

<svg version="1.1" viewBox="0 0 16 16" class="svg-icon svg-fill"></svg>

what am i doing wrong ?

Thx

dschewchenko commented 5 years ago

Hello. I had the same issue, when svgicon component cannot find builded svg. May be you don't import globally your bundle Please provide example in plunkr or in something else

scoutrul commented 5 years ago

I have the same issue My svg render is empty. image

The Browser Network tab shows that images have parsed. image

This is my component with lasy import: image

Why there is not injected into svg tag?