引入element报错Uncaught TypeError: Cannot read property ‘prototype‘ of undefined at eval (dom.js?5924:19

引入element报错Uncaught TypeError: Cannot read property ‘prototype‘ of undefined at eval (dom.js?5924:19的解决方案,我们来分析报错原因及解决方案。 看下引入写的也没错 那...

引入element报错Uncaught TypeError: Cannot read property ‘prototype‘ of undefined at eval (dom.js?5924:19的解决方案,我们来分析报错原因及解决方案。


attachments-2021-09-NH70dwty61543179d8471.png


看下引入写的也没错

attachments-2021-09-72EsD1cL615431a12cd19.jpg


那问题在哪?其实很简单,vue版本不支持。因为现在使用的3.0以上的VUE,是不兼容element-ui的。

attachments-2021-09-diFNq29A6154324692165.png


解决方案1:

将vue版本降到2.0

attachments-2021-09-YcoT0V3y615432f34189f.png


解决方案2:

可以将element-ui换为elementui-plus,这个版本是兼容的,也是3.0新版本

attachments-2021-09-Oua9kiuM615433a67d82e.png



注意:由于有旧版本element,vue等,更换前先删除干净,尽量用命令行删除,否则有可能会出现云里雾里的未知问题。

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
admin
admin

651 篇文章

作家榜 »

  1. admin 651 文章
  2. 粪斗 185 文章
  3. 王凯 92 文章
  4. 廖雪 78 文章
  5. 牟雪峰 12 文章
  6. 李沁雪 9 文章
  7. 全易 2 文章
  8. Stevengring 0 文章