wchbrad / vue-easy-tree Goto Github PK
View Code? Open in Web Editor NEWA tree component based on vue2.x that supports a small amount of data or a large amount of data, multiple functions, and virtual scrolling.
License: MIT License
A tree component based on vue2.x that supports a small amount of data or a large amount of data, multiple functions, and virtual scrolling.
License: MIT License
开启虚拟滚动时,懒加载我这边测试有问题
<template>
<div class="ve-tree" style="height:calc(100vh - 20px)">
<vue-easy-tree
ref="veTree"
node-key="id"
height="calc(100vh - 20px)"
:props="props"
lazy
:load="loadNode"
></vue-easy-tree>
</div>
</template>
<script>
export default {
data() {
return {
props: {
label: "name",
children: "children"
},
treeData: []
};
},
created() {
},
methods: {
loadNode(node, resolve) {
if (node.level === 0) {
return resolve([{ name: 'region' }]);
}
if (node.level > 1) return resolve([]);
this.getChildrenData(resolve)
},
getChildrenData(resolve) {
setTimeout(() => {
const data = [
{
name: Math.random(),
},
{
name: Math.random(),
},
{
name: Math.random(),
},
{
name: Math.random(),
},
]
resolve(data)
}, 1000)
}
}
};
</script>
<style>
</style>
用的虚拟列表组件vue-virtual-scroller,最大支持到67W,但是改造成树形之后,最大只能到10W的数据量,性能差距有点大。
请问虚拟滚动下过滤节点功能可用么
有vue3版本的吗
项目用的less
项目描述: 我原来使用el-tree的updateKeyChildren来实现类似点击某节点后再动态加载该节点下的数据,并没有采用el-tree组件的lazy+load的形式去懒加载,后来某些节点下面会有上万条数据导致页面卡死后,尝试使用vue-easy-tree的虚拟滚动来解决问题
问题描述: 再直接替换el-tree为vue-easy-tree时,没有任何报错,每个节点都能顺利展开,尤其是上万条节点也能顺利显示,但是当出现滚动条时,只要向上滚动至接近顶部时,所有展开的节点会全部收起。
支持 props.children 为函数吗?
在某些层级不想让其有下层级,想通过改变 props.children 实现,比如 props.children(data, node) 让开发者来判断是否有下层级?
谢谢大佬~非常感谢,不管样式还是功能都很全,
这方面有没有什么思路啊 请大佬指导下!
默认滚动条有点丑,想用el-scrollbar,有办法搭配着使用么?
比如一个树结构,有些节点需要高度大些,有些节点需要高度小些,有属性可以进行这样的调整吗 ?发现有个item-size是可以调节高度的,但他是调整所有节点高度,可以一些特殊的节点去专门调节他的高度吗;如果使用scoped slot的话 只能改样式,但涉及到高度时,超出的部分并不能给高撑开
我把vue-easy-tree和el-select组合了一下,做成了树型的下拉框组件,展开下拉框的时候虚拟列表不生效,布局也不正确,要不要考虑解决一下这种从隐藏到显示的问题,例如可以向外暴露一个重新渲染的函数
package.json
里面的 main: './dist/***',没有对应文件呢
于 Element-ui 的组件相比,缺少了展开/收起的动画。
缺少动画也就缺少了一些自然的感觉
请问样式文件可以换一套多种方案吗, less 一套和 css一套
prop "accordion" not work
启用虚拟滚动后,div中只有当前可视范围内的20几条数据,该如何通过外部点击使一个节点选中并且滚动到这个节点处呢?
如题,设置:render-after-expand="false"后,点击父节点,子节点并未触发 @check-change
vue3+ts架构引入该组件后会报错,是不支持吗?还是需要额外的加一些配置?
提示报错:Error in v-on handler: "Error: Rendered items limit reached"
It seems the scroller element isn't scrolling, so it tries to render all the items at once. Scroller: <div class="vue-recycle-scroller ready direction-vertical" style="height: 100%; overflow-y: auto; scroll-behavior: smooth;">…
vue-virtual-scroller.esm.js?e508:619 Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.
发现子节点超过2000多好像就会报这样的错,然后数据就只会加载一半
如题
提示item跟active is not defined,查看原因发现不兼容vue2.5.17,能否兼容一下
这个还有点小问题,父级没有半选的状态。
Originally posted by @oubohua in #43 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.