解决el-date-picker的Avoid mutating a prop directly错误
来源:openlayers-cesium.com 时间:06-28
在使用element-UI的时候,引用了时间组件el-date-picker,出现了如下的错误:
- 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
解决办法:
卸载其他版本的,安装2.15.7版本。究其原因是其他版本存在时间组件的问题或者和目前项目中有些许冲突。
npm uninstall element-ui
npm i element-ui@2.15.7 -S