原始配置中,并没有一键给图标配置颜色的属性,所以自己根据需求添加了个 效果如图 第一步:修改element-admin代码 : 位置:layout/components/Sidebar/Item.vue 19行左右 //修改前的代码 if (icon) { if (icon.includes('el-icon'))