element
element copied to clipboard
el-tree增加虚拟滚动后,node-expand不触发,去掉虚拟(不传height)就正常触发
Describe the bug
A clear and concise description of what the bug is.
Screenshots
If applicable, add screenshots to help explain your problem.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
environment information
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
请问你解决这个问题了吗?
可能作者忘了实现这个功能:
/* tree-virtual-node.vue */
props: {
// ...
onNodeExpand: Function
},
/* mixin/node.js */
handleExpandIconClick() {
// ...
if (this.expanded) {
// ...
} else {
// ...
/* add this line. */
this.onNodeExpand && this.onNodeExpand(node.data, node, this);
}
},
可能作者忘了实现这个功能:
/* tree-virtual-node.vue */ props: { // ... onNodeExpand: Function }, /* mixin/node.js */ handleExpandIconClick() { // ... if (this.expanded) { // ... } else { // ... /* add this line. */ this.onNodeExpand && this.onNodeExpand(node.data, node, this); } },
害,我也加了这个代码,点击展开,依然没有出现子节点