Adding a custom icon to the element

element provides a wealth of useful components for our icon of style a lot, but there are some common icon is not in the official icon inside the library, such as micro-channel, Taobao, Alipay and so on. So how do we need to add an icon to get in?

Because there is an official element icon library that we have introduced in accordance with the official class format, so unified.

I am here to say only one way, that is how to refer to Ali iconfont icon as our custom icon.

First of all it needs now iconfont official website to find the icons we need, and then added to the cart and into the project, as:

 

 Opens automatically added to the project after project, and then find the item we just added, click More Actions --- Edit Item

 

Then add the suffix: el-icon-xx.

 

 Here Editing project is to maintain the unity of class and element of the official icon library class.

After modifying can be downloaded down. We need to copy files to the figure below our project,

This file can then be introduced iconfont.css in main.js in. Then you can use the icons inside.

How to use it? Using these two class name iconfont.css in. .iconfont the class name must be written, and the second category name to see that you need to write that up.

 

 

 Adding a custom icon to the element

Guess you like

Origin www.cnblogs.com/liushusong/p/12026110.html