main.js :
//导入vant
import Vant from "vant";
//使用vant
Vue.use(Vant);
报错如下:
Uncaught TypeError: Cannot read property 'userAgent' of undefined
at isIOS ()
at Module.<anonymous> ()
at webpack_require ()
at Module.<anonymous> ()
at webpack_require ()
at Module.<anonymous> ()
at webpack_require ()
at Module.<anonymous> ()
at webpack_require ()
at eval (main.js:4)