element of the tree component styles rewrite

1. rewritten to achieve the effect of:

 

 2. page code

<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>

3. Style

.el-tree {
    background: #fff;
  }
 
  .tree-com .el-icon-caret-right:before {
    content: "";
    display: inline-block;
    background: url('./right.jpg');
    background-size: 7px 14px;
    width: 7px;
    height: 14px;
  }
 
  .tree-com .is-leaf.el-icon-caret-right:before {
    background: none;
  }

 

Guess you like

Origin www.cnblogs.com/jlyuan/p/11706121.html