alibaba / hooks

A high-quality & reliable React Hooks library. https://ahooks.pages.dev/
https://ahooks.js.org/
MIT License
13.95k stars 2.7k forks source link

feat: add useMouseInElement hook #2616

Open zhuyue6 opened 2 months ago

zhuyue6 commented 2 months ago

[中文版模板 / Chinese template]

🤔 This is a ...

🔗 Related issue link

#2615

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

CLAassistant commented 2 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

crazylxr commented 1 week ago

emm,一般我们判断鼠标是否在一个元素上,以及拿到他的回到,不是直接监听这个元素的 mouseover,mouseleave/mouseout 就可以了么,你这个判断方式的作用是什么呢?