vue mui.js调用报错

mac2025-04-23  3

在main.js里添加

import mui from "./lib/mui/js/mui.js"

如果不添加下面会显示mui is not defined 报错

Vue.prototype.mui = mui

 

添加成功后还是会报错  Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them。。。

在vue里会使用严格模式,而mui不支持严格模式上使用

这样就要在vue_cli 里排除这个mui.js  在根目录的.babelrc里添加:    

"ignore":["./src/lib/mui/js/mui.js"]

 

在.eslintignre 添加   

src/assets/js/mui.js

 

  

 

最新回复(0)