![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/9cb74d849f7e366e499ce7ff0dc78b16.png)
autoExpandParent:true,
expandedKeys:[],
currentId: '',
dataList: [],
treeData: [],
parentNode: [], //存放父节点
<a-tree
class="tree-main-table"
showIcon
@select="onSelect"
:treeData="treeData"
:expanded-keys="expandedKeys"
:autoExpandParent="autoExpandParent"
@expand="onExpand"
>
<template slot="custom" slot-scope="{ title, slots, expanded, key }">
<!-- 父亲节点 -->
<div class='tree-parent' :class="expanded && slots.icon == 'parent' ? 'tree-select-parent' : currentId == key && slots.icon == 'child' ? 'tree-select-child tree-child' : slots.icon == 'child' ? 'tree-child' : ''" >
<a-icon v-if="slots.icon == 'parent'" :type="expanded ? 'minus' : 'plus'" style="color:#4A8088"/>
<span v-if="slots.icon == 'child'" class="iconfont iconlingxingkuang icon-linng-xing"></span>
<span style="margin-left:10px" class="tree-title" :title="title">{
{
title }}</