当前位置:   article > 正文

el-button 自定义icon图标_el-button自定义icon

el-button自定义icon

效果

代码

button的icon属性自定义一个图标名称,这个自定义的图标名称会默认添加到button下i标签的class上,我们只需要设置i标签的样式就可以了

html

<el-button size="mini" type="text" icon="my-icon-kucun" @click="toStock(scope.row)">库存详情</el-button>

css

  1. ::v-deep .my-icon-kucun {
  2. background: url('../../../../assets/fullchain_images/measure.png') center no-repeat;
  3. font-size: 12px;
  4. background-size: cover;
  5. }
  6. ::v-deep .my-icon-kucun:before {
  7. content: "替";
  8. font-size: 20px;
  9. visibility: hidden;
  10. }
  11. ::v-deep .my-icon-kucune {
  12. font-size: 16px;
  13. }
  14. ::v-deep .my-icon-kucun:before {
  15. content: "\e611";
  16. }

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/748122
推荐阅读
相关标签
  

闽ICP备14008679号