1、listen EADDRINUSE .127.0.0.1:3000
端口號被佔用。可能無意啓動3000端口,但沒有正常關閉,後臺的node程序佔用3000。
方法一:修改package.json配置的端口號 "scripts": {"start": "webpack-dev-server --open --port 3001"}
方法二:啓動任務管理器,關閉進程。
2、'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
使用了非嚴格模式的語法。
取消babel的嚴格模式:https://github.com/genify/babel-plugin-transform-remove-strict-mode
npm install babel-plugin-transform-remove-strict-mode
{
"plugins":["transform-remove-strict-mode"],
"ignore":["./src/lib/mui/js/mui.min.js"]
}
3、[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
給事件添加passive:true,表示該事件不阻止默認行爲,即不調用preventDefault()。可能出現MUI的底部選項卡不能跳轉。
passive特性參見http://www.cnblogs.com/ziyunfei/p/5545439.html https://blog.csdn.net/shenlei19911210/article/details/70198771。
方法一:重新給底部選項卡設置事件。還會報錯,但是可以點擊鏈接了。*{touch-action:none;}可取消報錯信息。
mounted(){
mui('.mui-bar-tab').on('click','.mui-tab-item',function(){
document.location.href=this.href;
});
}