[Bug Report] cascader-node.vue binding events
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.14.1
### OS/Browsers version
window 10
### Vue version
3.0.4
### Reproduction Link
https://codepen.io/huangxiaomin/pen/RwGojxW
### Steps to reproduce
cascader-node组件渲染时,下面代码会有重复行为
if (expandTrigger === 'click') {
events.on.click = this.handleExpand;
} else {
events.on.mouseenter = e => {
this.handleExpand();
this.$emit('expand', e);
};
events.on.focus = e => {
this.handleExpand();
this.$emit('expand', e);
};
}
if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
events.on.click = this.handleCheckChange;
}
### What is Expected?
其实只需要执行一次就可以了
### What is actually happening?
执行两次this.panel.handleExpand
模式为click时,如果时叶子节点条件为isLeaf && !isDisabled && !checkStrictly && !multiple时这边也会执行,和下面的判断重复了,重复执行了this.panel.handleExpand
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.