// 禁用双击放大
var lastTouchEnd = 0;
document.documentElement.addEventListener('touchend', function (event) {
var now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault();
}
lastTouchEnd = now;
}, {
passive: false
});
or
在vue的index.html里面加
<script>
window.onload = function() {
document.addEventListener('touchstart', function(e) {
console.log("1",e.touches.length)
if (e.touches.length > 1) {
e.preventDefault()
}
})
document.addEventListener('gesturestart', function(e) {
console.log("2")
e.preventDefault()
})
}
</script>