const listenDomClick = (e) => {
console.log(e);
}
useEffect(() => {
document.addEventListener(‘click‘, listenDomClick)
return () => {
document.removeEventListener(‘click‘, listenDomClick)
}
},[])
2023-09-26 20:08:52
const listenDomClick = (e) => {
console.log(e);
}
useEffect(() => {
document.addEventListener(‘click‘, listenDomClick)
return () => {
document.removeEventListener(‘click‘, listenDomClick)
}
},[])
下一篇:微信小程序的双向绑定