Mui solved using or introducing mui.js vue_cli on various problems and error

Original: https://blog.csdn.net/u012815877/article/details/81187826

 

Add in main.js

 import mui from './assets/js/mui.js'
 

If you do not add the following displays mui is not defined error

 Vue.prototype.mui = mui
 

After successfully added mui can use the? It was found that will be used in strict mode in vue, but mui is not supported on strict mode, the error will be Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

Such exclusion is necessary in the vue_cli in this mui.js added .babelrc in the root directory:    

"ignore":[  './src/assets/js/mui.js'],
 

Add .eslintignre   

 src/assets/js/mui.js  
 

  

When the last call, the following examples

Mui prints successfully target

 

 

Guess you like

Origin www.cnblogs.com/v616/p/11290281.html