<nut-icon
type="top"
>
</nut-icon>
支持通过size设置图标大小,注意包含单位,如“40px”、“4rem”…
<nut-icon
type="action"
size="40px"
>
</nut-icon>
支持通过color设置图标颜色,支持十六进制/RGB/RGBA等写法。
<nut-icon
type="trolley"
color="#f0250f"
>
</nut-icon>
支持通过url可以自定义添加额外的图片。
<nut-icon type="self" :url="require('../../assets/svg/trolley.svg')"></nut-icon>
nutui 自带图标库提供了下面的这些可选值。
| 字段 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| type | 图标,可选值top/action/cross/down/right/more/plus/search/trolley/tick/minus/circle-cross | String | - |
| size | 尺寸,需要带单位 | String | - |
| color | 颜色 | String | - |
| url | 自定义图标路径,必须是svg格式,请用 require 方式引入 | String | - |