- 改写实现效果:
2.页面代码
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
3.样式代码
.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;
}