下载
npm install fastclick
main。js
引用
import fastClick from 'fastclick'
fastClick.attach(document.body)
解决input 点击不灵敏
fastClick.prototype.focus = function (targetElement) {
let length;
if (targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
length = targetElement.value.length;
targetElement.focus();
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
};
移动端vue 解决click 300s延迟 Input 按钮灵敏度
最新推荐文章于 2023-01-10 16:58:25 发布