![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/41cb85aa629fadd7d9d24fa514f37540.png)
<el-popover placement="right" width="400" trigger="focus">
<el-tree
class="filter-tree"
:data="typeList"
:props="treeProps"
default-expand-all
:expand-on-click-node="false"
highlight-current
ref="tree"
@node-click="treeClick"
>
</el-tree>
<el-input placeholder="请输入" v-model="type" slot="reference"></el-input>
</el-popover>
data() {
return {
type: "",
typeList: [],
treeProps: {
label: "name",
value: "code",
},
}
},
treeClick(value) {
this.type = value.name
this.$emit("institutionsChange", value)
},