vue-tree-virtual-list
v0.1.0
Published
A Vue tree component to deal with large amounts of data, based on vue-virtual-scroll-list
Downloads
5
Maintainers
Readme
vue-tree-virtual-list
A Vue tree component for lager data, based on vue-virtual-scroll-list
安装
npm i vue-tree-virtual-list -s
用法
.vue file:
<VueVirtualTree :data="treeData" :height="500" :props="defaultProps" show-checkbox>
<template v-slot:default="{ node }">
<span>{{ node.label}}</span>
</template>
</VueVirtualTree>
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: [...],
}
}
...