Comments (4)
element的tree是通过一个visible变量来控制树节点的显示的,可能是传入vue-virtual-scroll-list的data-sources数据和实际显示的节点不一致导致的显示错误,
可以尝试在tree.vue中的flattenTree方法中添加一个判断,过滤掉传入data-sources的数据
flattenTree(datas) {
return datas.reduce((conn, data) => {
if (data.visible) { // 添加一个判断
conn.push(data);
}
if (data.expanded && data.childNodes.length) {
conn.push(...this.flattenTree(data.childNodes));
}
return conn;
}, []);
},
from element.
过滤掉传入数据不现实 如果tree组件有勾选功能 数据过滤了怎么勾选 filter-node-method节点的样式是display:none 整体tree的padding计算时候没考虑style:none节点。
from element.
element的tree是通过一个visible变量来控制树节点的显示的,可能是传入vue-virtual-scroll-list的data-sources数据和实际显示的节点不一致导致的显示错误,
可以尝试在tree.vue中的flattenTree方法中添加一个判断,过滤掉传入data-sources的数据flattenTree(datas) { return datas.reduce((conn, data) => { if (data.visible) { // 添加一个判断 conn.push(data); } if (data.expanded && data.childNodes.length) { conn.push(...this.flattenTree(data.childNodes)); } return conn; }, []); },
你的这种方法可以使用,他的数据存在node里面并没有破坏原始数据,还能及时更新虚拟滚动的列表
from element.
element的tree是通过一个visible变量来控制树节点的显示的,可能是传入vue-virtual-scroll-list的data-sources数据和实际显示的节点不一致导致的显示错误,
可以尝试在tree.vue中的flattenTree方法中添加一个判断,过滤掉传入data-sources的数据flattenTree(datas) { return datas.reduce((conn, data) => { if (data.visible) { // 添加一个判断 conn.push(data); } if (data.expanded && data.childNodes.length) { conn.push(...this.flattenTree(data.childNodes)); } return conn; }, []); },
你的这种方法可以使用,他的数据存在node里面并没有破坏原始数据,还能及时更新虚拟滚动的列表
能更新到你的git上吗这个方法
from element.
Related Issues (20)
- Attention: 关于组件样式的问题
- 需要使用公服npm的主题包 HOT 1
- feat(edit-table): formatter 支持返回定制的组件或 jsx
- feat(edit-table): 支持删除行数少于 1 条, 即,可到达 0 条
- element-ui 升级到2.12.0 HOT 2
- [El-Tab]: tab-item 支持 slot HOT 1
- inputNumber 精度问题
- el-edit-table 的 setOptions 问题
- edit-table oldValue 没更新
- [el-timeline]: 支持时间戳放在左边
- el-tree 多节点全选卡顿
- el-table全选不能选中子内容 HOT 1
- 组件文档有些图片无法展示
- el-tree增加虚拟滚动后,node-expand不触发,去掉虚拟(不传height)就正常触发 HOT 3
- 大数据,搜索列表最后的数据,出现空白区域,不显示搜索后的数据
- 设置固定宽度后样式显示错误
- 开启height虚拟滚动之后过滤节点功能失效,如果用远程搜索会导致整个树数据变化而不是节点显示隐藏,从而导致勾选子节点会把父节点也一并勾选
- el-tree 增加虚拟滚动后,加载 26 万数据,报错:Maximum call stack size exceeded
- 为啥不维护了呢 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from element.