Avoid mutating a prop directly since the value will be overwritten whenever
使用elementUI时自己封装了个子 组件 el-time-select / el-date-picker /el-date-picker 时报错
([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")
但是仅仅是控制台报错,系统能正常运行,有强迫症的我打算修复好它
百度了一下,说什么子组件改变了prop的值,但是我并没有改变prop的值
经过一系列查询最终发现和elementUI版本有关
目前亲测可用版本为 2.15.6 注意前面不要加 ^ 符号
科普小知识
指定版本号
(1)指定版本:比如"vue": "2.15.2",表示指定安装2.15.2的版本
(2)波浪号~ 指定版本:比如 "vue": "~2.15.2",表示安装2.5.x的最新版本(不低于2.15.2),但是不安装2.16.x,也就是说安装时不改变大版本号和次要版本号
(3)^ 指定版本:比如 "vue": "^2.15.2" ,表示安装2.5.2及以上的版本,但是不安装3.0.0,也就是说安装时不改变大版本号。