随笔 - 142  文章 - 14  评论 - 0  阅读 - 70161

日常开发记录-[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value.

报错原因:elementUI 下载版本问题

报错提示:

vue.runtime.esm.js?2b0e:619 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "placement"

found in

---> <ElDatePicker> at packages/date-picker/src/picker.vue
<Index> at src/views/demo/index.vue
<App> at src/App.vue
<Root>

解决方案:我使用的 ElementUI 版本是 "element-ui": "^2.15.9",会出现这个报错提示,更换一个更低点的版本即可解决报错,不解决报错好像也不影响效果展示,自行【判断】

// 卸载 elementUI 旧版本
npm uninstall element-ui
// 安装新版本
npm i element-ui -S
// 安装指定版本 
npm i element-ui@2.15.7 -S

 查看自己项目使用的 ElmentUI 版本:

打开项目中的 package.json 文件查看即可

 

posted on   法老的微笑  阅读(309)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示