报错提示:
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
标签:vue,computed,value,prop,ui,报错,element From: https://www.cnblogs.com/huguo/p/16645394.html