MMF-FE / svgicon

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

vsvg convert error #120

Closed jackarcher73 closed 4 years ago

jackarcher73 commented 4 years ago

svg is: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>

but vsvg(3.2.8) generated js file as:

var icon = require('vue-svgicon')
icon.register({
  'help-circle': {
    width: 24,
    height: 24,
    viewBox: '0 0 24 24',
    data: '<circle pid="0" cx="12" cy="12" r="10"/><path pid="1" d="M12 17h.01M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"/>'
  }
})

the last line element is lost!

Allenice commented 4 years ago

vsvg will not be compatible with all svg content. Please refer to iconfont's export instructions when exporting svg files. refs: https://www.iconfont.cn/help/detail?spm=a313x.7781069.1998910419.16&helptype=draw