Skip to content

FxIcon 图标

基于 iconify 的图标组件,通过 name="前缀:图标名" 使用各图标集(Element Plus、Ant Design 等)。

Element Plus 图标

Ant Design 图标

不同尺寸

颜色

通过 color 指定图标颜色,支持任意合法的颜色值(颜色字面量、@fx/styles--color-* token 等);默认 currentColor,跟随父元素文字颜色,亮暗模式自动跟随。

Props

属性类型默认值说明
namestring图标名,格式 前缀:图标名(如 ep:userant-design:home-filled
sizenumber | string'16px'图标尺寸(px)
colorstring'currentColor'图标颜色
customClassstring自定义类名

FxIconPicker 图标选择器

图标选择器组件,支持搜索、按图标集(本地 SVG / Element Plus / Ant Design)分类选择,v-model 绑定图标名。

基础用法

尺寸

(large / default / small),默认 default

Props

属性类型默认值说明
modelValuestring绑定值,图标名(v-model
placeholderstring'请选择图标'占位提示
size'large' | 'default' | 'small''default'输入框尺寸(同 FxInput)
heightnumber418弹层高度(px)

Events

事件说明
update:modelValue图标名变化时触发