npm i vue2-org-tree
main.js
import Vue2OrgTree from 'vue2-org-tree'
Vue.use(Vue2OrgTree)
html
<link href="https://unpkg.com/vue2-org-tree/dist/style.css" rel="stylesheet">
<template>
<el-card :style="{height: scrollHeight}" style="overflow-y: auto;overflow-x:hidden">
<vue2-org-tree
:data="data"
:horizontal="true"
:label-class-name="labelClassName"
collapsable
@on-expand="onExpand"
:node-btn-content='renderContent'
/>
</el-card>
</template>
<script>
import Vue2OrgTree from 'vue2-org-tree'
import {
VueOkrTree} from 'vue-okr-tree';
export default {
data() {
return {
filterText: '',
data