Tree: add iconClass attribute (#13337)

This commit is contained in:
hetech
2018-11-07 19:06:36 +08:00
committed by GitHub
parent eb41032658
commit d1440c9608
7 changed files with 16 additions and 8 deletions

View File

@@ -26,9 +26,13 @@
<div class="el-tree-node__content"
:style="{ 'padding-left': (node.level - 1) * tree.indent + 'px' }">
<span
class="el-tree-node__expand-icon el-icon-caret-right"
@click.stop="handleExpandIconClick"
:class="{ 'is-leaf': node.isLeaf, expanded: !node.isLeaf && expanded }">
:class="[
{ 'is-leaf': node.isLeaf, expanded: !node.isLeaf && expanded },
'el-tree-node__expand-icon',
tree.iconClass ? tree.iconClass : 'el-icon-caret-right'
]"
>
</span>
<el-checkbox
v-if="showCheckbox"