Android系统
// 禁止缩放和左右滑动
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
IOS系统
// APP.vue
// 禁止缩放
window.onload = function() {
document.addEventListener('touchstart', function(event) {
if (event.touches.length > 1) {
event.preventDefault();
}
});
document.addEventListener('gesturestart', function(event) {
event.preventDefault();
});
};
// css
// 禁止左右滑动
html,body {
touch-action: pan-y;
}