在main.js中

import './assets/images/iconfont/iconfont.css'
import './assets/images/iconfont/iconfont.js'

 

assets / images / iconfont中的东西 就是你下载的文件 解压出来的

在组件中使用的话

<svg class="icon closeImg" aria-hidden="true"">
           <use xlink:href="#icon-guanbi"></use>
 </svg>

其中红色的字是从阿里iconfont里复制的代码

vue 中使用阿里iconfont彩色图标

 

 

 

记得在css中加

.icon {
      width: 1em;
      height: 1em;
      vertical-align: -0.15em;
      fill: currentColor;
      overflow: hidden;
    }

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-11-30
  • 2021-06-17
  • 2021-04-18
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2021-10-01
  • 2021-12-26
  • 2021-04-27
  • 2021-12-22
  • 2021-12-18
相关资源
相似解决方案