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
function setHanld(){ const suffix = this.dataset.sizing || ''; // console.log(suffix); .... } inputs.forEach(input => input.addEventListener("mousemove",setHanld));
当鼠标只要经过input就会执行setHanld,性能上会不会有点问题
input
setHanld
The text was updated successfully, but these errors were encountered:
这是为了在拖动滑块时,能实时显示效果。否则需要等到松开鼠标后才能触发改变。
Sorry, something went wrong.
是的,我的意思「鼠标不要拖着滑动,在input上的区域滑动就会触发这个效果,是否对性能有影响」
@soyaine inputs.forEach( input => input.addEventListener('change', handleUpdate)); inputs.forEach( input => input.addEventListener('mousemove', handleUpdate)); 添加change和mousemove的这两个事件监听,是否可以直接用一个input的事件代替 inputs.forEach( input => input.addEventListener('input', handleUpdate));
No branches or pull requests
问题
当鼠标只要经过
input
就会执行setHanld
,性能上会不会有点问题The text was updated successfully, but these errors were encountered: