cenkai88 / vue-svg-icon

a solution for multicolor svg icons in vue2.0 (vue2.0的可变彩色svg图标方案)
https://cenkai88.github.io/vue-svg-icon/demo/
Other
562 stars 84 forks source link

Error in render function: "TypeError: Cannot read property 'viewBox' of undefined" #18

Closed lianghuilin closed 6 years ago

lianghuilin commented 7 years ago

main.js:

import Icon from 'vue-svg-icon/Icon.vue'
Vue.component('icon', Icon);

app.vue:

<template>
  <div id="app">
<icon slot="icon" name="iconfont" scale="20"></icon>
</div>
</template>

project file list:

src 
  ---svg
  ------iconfont.js
  ------iconfont.svg
cenkai88 commented 7 years ago

can you send the svg file to me? cenkai29@qq.com

cenkai88 commented 7 years ago

@lianghuilin maybe you created the svg from iconfont, for this project, you just need to download the icon pic file in svg format instead of .js + .svg