Set icon in treedata and render through rendercontent. The icon is replaced successfully. However, different icons need to be set for expansion and collapse. How do you set them?
<span
@click.stop="handleExpandIconClick"
:class="[
{ 'is-leaf': node.isLeaf, expanded: !node.isLeaf && expanded },
'el-tree-node__expand-icon',
tree.iconClass ? tree.iconClass : 'el-icon-caret-right'
]"
>
The logic in the source code is like this: iconclass sets the expansion icon, and the folding icon rotates 90 degrees.
Rendercontent is used to set the content in the tree.