1. 要替换的图标
  2. ::v-deep .el-table__column-filter-trigger .el-icon-arrow-down {
  3. //替换图片地址
  4. background: url('../../../../../assets/icon/bg-screen.png') center center
  5. no-repeat;
  6. background-size: 20px;
  7. }
  8. ::v-deep .el-table__column-filter-trigger .el-icon-arrow-down::before {
  9. //占位
  10. content: '替';
  11. font-size: 16px;
  12. visibility: hidden;
  13. }

给元素添加图标

  1. //el-tree-node__label 要给添加图标的元素
  2. ::v-deep .el-tree-node__label {
  3. /* 保证:after为元素的显示 */
  4. background-image: url('');
  5. }
  6. ::v-deep .el-tree-node__label:after {
  7. display: inline-block;
  8. background-image: url('../../assets/icon/caidan.png');
  9. background-position: center center;
  10. background-size: 40px 20px;
  11. content: '';
  12. width: 40px;
  13. height: 20px;
  14. /* visibility: hidden; 隐藏content中的内容*/
  15. margin-left: 280px;
  16. }

image.png