How to add new icon to vue3 project?

Steps

  1. Using iconfont platform
  2. Create a project
  3. Pick icons to project
  4. Vue3 project using iconfont three methods
    • Unicode: not easy to read
    • Font class: easy to read, compality is well, IE8+
    • Symbol: official recommend, future method, IE9+

Font class method

Add style to index.html

<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/c/font_4418642_9hvs1q6c63.css">

Project use iconfont

<el-icon><i class="iconfont icon-left"></i></el-icon>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *