element icon indicating copy to clipboard operation
element copied to clipboard

el-tree增加虚拟滚动后,node-expand不触发,去掉虚拟(不传height)就正常触发

Open sinkxy opened this issue 3 years ago • 3 comments

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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]

sinkxy avatar Apr 16 '21 02:04 sinkxy

请问你解决这个问题了吗?

konnga avatar May 27 '21 06:05 konnga

可能作者忘了实现这个功能:

/* 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);
  }
},

ab690257072 avatar Jul 27 '21 10:07 ab690257072

可能作者忘了实现这个功能:

/* 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);
  }
},

害,我也加了这个代码,点击展开,依然没有出现子节点

konnga avatar Jul 28 '21 01:07 konnga