效果:
对tree组件封装成treeComponent 组件,内容如下,从项目中选取
<el-tree
ref="tree"
v-loading="loading"
:data="treeData"
v-bind="treeProps"
@current-change="onCurrentChange"
>
<div slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="!data.showInput"> {
{ node.label }}</span>
<el-input
v-else
ref="inputVal"
size="mini"
:value="data.name.trim()"
style="width:150px"
:autofocus="true"
@blur="onSaveNode( data)"
@input="a =>