第一步是本身icon是iconfont.json
格式是
{
"id": "2989802",
"name": "低代码平台",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "FontClass/Symbol 前缀是icon-;Font Family 是iconfont;",
"glyphs": [
{
"icon_id": "21823886",
"name": "s-operation",
"font_class": "s-operation",
"unicode": "e678",
"unicode_decimal": 59000
},
]
}
第二步是vue项目是获取icon
import iconList from '/@/../public/aliFont/iconfont.json';
const originList = iconList.glyphs.map((item) => `icon-${item.font_class}`);
然后对数据进行处理