Vue references Aliyun iconfont to use icon icons (too few elementUI icons)

1. Enter Iconfont (https://www.iconfont.cn/)
2. Find your project -> More operations -> Edit project
Insert picture description here

3. Modify the prefix, and then you can use icon-al-xxxxx (you can modify your custom and favorite style)
Insert picture description here
4. Download the icon file to the local
Insert picture description here
5. After decompressing the downloaded file, find the iconfont in the directory. css file, and then make the following modifications
Insert picture description here
. 6. Copy the following iconfoot file to the project.
Insert picture description here

8. Introduce iconfont in the Main.js of vue, before the css of elementUI, and after I put it in, the icon of elementUI will not be displayed
Insert picture description here
9. After that, you can copy the code and use it like elementUI. (For example: icon="icon-al-yanzhengma2" class="icon-al-syanzhengma2"), if it is not displayed, restart the project npm run serve.
Insert picture description here
Reference: https://www.jianshu.com/p/a6b54662753b

Guess you like

Origin blog.csdn.net/qq_17627195/article/details/109045052