前言
记录一下前端Element Plus框架的几种图标按钮使用方式,比如有无图标的按钮,控制图标大小的按钮等。
一、示例代码
<el-button
size="small"
type="primary"
icon="UploadFilled"
@click="void(0)"
>
点击事件
</el-button>
<el-button size="small" type="primary" plain @click="void(0)">
<el-icon :size="18">
<UploadFilled />
</el-icon>
<span>点击事件</span>
</el-button>
<el-button
size="small"
type="primary"
circle
>
<el-icon :size="18">
<UploadFilled />
</el-icon>
</el-button>
<el-icon
:size="20"
style="color: #5e7ce0; cursor: pointer"
@click="void(0)"
>
<UploadFilled />
</el-icon>