Element UI 是一个基于 Vue 2.0 的组件库,它提供了丰富的 UI 组件,其中包括图标组件。Icon 组件可以方便地在你的 Vue 应用中添加丰富的图标。
简介
Icon 组件提供了多种图标,你可以通过设置 type
属性来选择不同的图标类型。
属性
type
: 图标类型,支持el-icon
开头的图标类名。size
: 图标大小,单位为像素。color
: 图标颜色。
示例
<template>
<div>
<el-icon type="el-icon-info"></el-icon>
<el-icon type="el-icon-error" size="20"></el-icon>
<el-icon type="el-icon-success" color="#409EFF"></el-icon>
</div>
</template>
更多信息
想要了解更多关于 Element UI 的信息,请访问我们的官方文档:Element UI 官方文档
Vue.js Element UI Icon 示例