We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目前useClickAway必须存在一个已渲染完成的dom作为target,但有时候target是动态创建的,不知道什么时候才渲染ok, 但当有点击事件的时候再去判断点击事件是否在指定选择器内部
The text was updated successfully, but these errors were encountered:
支持 CSS 不太现实,如果传入选择器的话,是无法感知到 target 发生变化的,这样就无法计算应该绑定的事件。
我是建议 target 支持传函数,返回值是 Element,类型是这样 (() => Element),这样的话你可以在函数里面通过 css 选择器查询 DOM,这样更通用一些
Sorry, something went wrong.
No branches or pull requests
目前useClickAway必须存在一个已渲染完成的dom作为target,但有时候target是动态创建的,不知道什么时候才渲染ok, 但当有点击事件的时候再去判断点击事件是否在指定选择器内部
The text was updated successfully, but these errors were encountered: