发布于 4年前

vue开发移动端项目点击事件失效,并且报错[Intervention]

问题描述:使用vue开发移动端页面时,提示如下错误,并且点击事件不触发,PC端正常

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.

解决:全局样式添加* {touch-action: pan-y;}, pan-y表示启用单指垂直平移手势(上下滑动事件)

©2020 edoou.com   京ICP备16001874号-3