1. 在el-tree标签上设置一个class值class="custom-tree"
<el-tree :data="deptOptions" :props="defaultProps" class="custom-tree">
<template slot-scope="{ node, data }">
<span>
el-tree文本溢出时,显示省略号
<!-- {{ node.label}}-->
</span>
</template>
</el-tree>
2.class 设置样式 文本溢出省略号
.custom-tree .el-tree-node__content{
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display:block;
}