安装完 vant 以后 报错
报错信息: app.js:127 Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_10__.ref) is not a function
解决思路 : 查看我们的 package.json
文件中 我们使用的 vant 和 vue 的版本是不是一致的 ,如果不一致 ,把 Vant 卸载掉 重新安装
解决方案:
- 卸载 vant
yarn remove vant
- 重新安装vant :
yarn add [email protected]
tips:
让 vant 和 vue 的版本 保持一致
这样这个头疼的问题就解决了~~~