Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小BUG #1

Open
feilewang opened this issue Apr 25, 2021 · 1 comment
Open

小BUG #1

feilewang opened this issue Apr 25, 2021 · 1 comment

Comments

@feilewang
Copy link

if(e.target.tagName !== 'BODY') return
这个地方不准确,如果有其他事件,这个抓不到

@heqingfeifei
Copy link

heqingfeifei commented May 17, 2021

/**
* body点击隐藏级联面板
*/

EoCascader.prototype.bindBodyClick = function bindCascaderClick(e) {
// if(e.target.tagName !== "DIV") return
var target = e.target || e.srcElement; //
while(target){
if (target.id && target.id == "cascader-wrap"){ //循环判断至根节点,防止点击的是#cascader-wrap和它的子元素
return;
}
target = target.parentNode;
}
this.panelShowState = false
this.ele.className = 'cascader-wrap'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants