<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)
},