近期把 element-ui 升级到了官网最新的 2.15.7版本,无意间发现控制台出现了 Prop being mutated: "placement" 警告,完整警告:[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"错误原因锁定组件,发现是 el-date-picker 组件抛出的警告。通过在 github 上搜索,最终找到了答案问题出在了这个 PR #21806 增加了 props placement 用来适应位置,但是之前的代码 created 时有给 placement 赋值。this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left; 说白了之前 placement 是 data 的对象,现在变成 props 了,然后修改就报错了解决方案想要解决这个问题,可以修改版本到 2.15.8npm uninstall element-ui npm install element-ui@2.15.8 -s解决方案来自:https://github.com/ElemeFE/element/issues/21905