el-tree 字节的宽度超出 不出现横向滚动条
父组件
```javascript
<el-col :span="4" :xs="24">
<div>
<Category ref="category" @clickCategory="handleQuery"></Category>
</div>
</el-col>
Category 组件
<div class="head-container">
<el-tree
:data="categoryOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
highlight-current
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span class="edit-tree" v-show="data.id != 0">
<i
class="el-icon-circle-plus-outline"
@click.stop="() => addCategory(data)"
></i>
<i class="el-icon-edit" @click.stop="editCategory(data)"></i>
<i
class="el-icon-delete"
v-show="data.id != '1'"
@click.stop="() => remove(data)"
></i>
</span>
</span>
</el-tree>
</div>
效果图
参考改下 https://blog.csdn.net/mia0303/article/details/113884834
树截图
updated () {
// 给多选树设置默认值
this.$refs.tree.setCheckedKeys(this.checkedId)
},
checkedId为勾选节点的数组,不区分父子节点。