FaIcon 图标
统一解析 el-icon-*、fa-icon-*、本地图标 Class 和外部 SVG URL。
Element Plus、Fast 与自定义图标
可操作示例查看代码
<template>
<div class="demo-row">
<FaIcon name="el-icon-Search" :size="26" color="var(--el-color-primary)" />
<FaIcon name="el-icon-Setting" :size="30" color="var(--el-color-success)" />
<FaIcon name="fa-icon-FullScreen" :size="28" color="var(--el-color-warning)" />
<FaIcon name="fa-icon-LoadingImage" :size="24" color="var(--el-color-danger)" />
</div>
</template>FaIcon 完整 API
按 name 前缀解析 Element Plus、Fast、本地图标类名或外部 SVG URL。
Props 属性
EL 默认值取自导入 Fast 前的 Element Plus。 2.14.7
| 属性 | 来源 | 说明 | 类型 | 默认值 |
|---|---|---|---|---|
name必填 | Fast 新增 | 图标名称、CSS 类名或外部 SVG 地址。 | String | — |
size | EL 原生 | 组件尺寸。 | String / Number | — |
color | EL 原生 | 图标 SVG 的填充颜色。 | String | — |
Slots 插槽
| 名称 | 来源 | 说明 | 参数 / 类型 |
|---|---|---|---|
default | EL 原生 · 未透传 | 组件默认内容插槽。 | — |
