做项目用到了MUI的scroll控件 故此我引入了mui.min.js mui.js用到了’caller’, ‘callee’, 和 ‘arguments’ 安装babel-plugin-transform-remove-strice-mode插件的办法在老版本的Babel是可以的 在.balelrc中添加排除项 排除你的mui.js即可 解决了strict mode的问题之后 可能还会有个不影响使用的报错: 虽说不影响使用 但不太美观 顺便解决一下吧 touch-action能够提高页面的流畅度(只有chrome支持)
问题描述
然而 猝不及防地报错了:
错误信息:'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
原因
但webpack打包好的bundle.js默认是启用严格模式(strict mode)的
在严格模式下 不能使用’caller’, ‘callee’, 和 ‘arguments’
因此 这两者起了冲突 从而报错
解决方法
npm install babel-plugin-transform-remove-strict-mode
或是npm install @babel/plugin-transform-strict-mode
但在新版本的Babel中没用 依旧会报错解决方法其实很简单:
"ignore": [ "./src/lib/mui/js/mui.min.js" ]
错误信息:[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
添加一个全局的样式即可:* { touch-action: pan-y; }
pan-y样式的作用是启用单指垂直平移手势
即 单指在页面纵向滑动时 能提高页面的流畅度
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
阅读和此文章类似的: 全球云计算