Preparation
在使用动态图标之前,请先确保你的项目安装了 element-plus icons
sh
$ npm install @element-plus/icons-vue
sh
$ yarn add @element-plus/icons-vue
sh
$ pnpm install @element-plus/icons-vue
Dynamic Icon
API
参数 | 说明 | 类型 | 默认 | 是否必须 |
---|---|---|---|---|
icon | Icon name in Ant Design | String | undefined | true |
color | Icon color | String | currentColor | false |
width | Icon width | String | undefined | false |
height | Icon height | String | undefined | false |