A Vue tree component to deal with large amounts of data, based on vue-virtual-scroll-list
npm install vue-tree-virtual-listjs
npm i vue-tree-virtual-list -s
`
用法
.vue file:
`html
{{ node.label}}
`
`js
import VirtualTree from 'vue-tree-virtual-list'
import 'vue-tree-virtual-list/dist/vue-tree-virtual-list.css'
...
export default {
components: {
VirtualTree,
},
data(){
this.defaultProps = {
id: 'id',
children: 'childList',
label: 'companyName'
}
return {
treeData: [...],
}
}
...
``