elementui 树形控件节点自定义图标 初始化自定义节点颜色


                     //不可与renderContent共存
                  
                        
                          //后台返回
                          //后台返回
                          {{ node.label }}
                          {{ node.label }}
                          {{ node.label }}
                               
                      
            

样式elementui 自定义图标

.el-icon-company{
         background: url(../../../assets/image/frame.png) center no-repeat;
         background-size: cover;
         margin-right: 6px;
    }
    
    .el-icon-company:before{
        content: "替";
        font-size: 16px;
        visibility: hidden;
    }
    .el-icon-project{
        background: url(../../../assets/image/project.png) center no-repeat;
        background-size: cover;
         margin-right: 6px;
    }
    .el-icon-project:before{
        content: "替";
        font-size: 16px;
        visibility: hidden;
    }

实现效果:


image.png

你可能感兴趣的:(elementui 树形控件节点自定义图标 初始化自定义节点颜色)