Avoid mutating a prop directly since the value will be overwritten whenever
使用elementUI時(shí)自己封裝了個(gè)子 組件?el-time-select / el-date-picker /el-date-picker 時(shí)報(bào)錯(cuò)
([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")
但是僅僅是控制臺(tái)報(bào)錯(cuò),系統(tǒng)能正常運(yùn)行,有強(qiáng)迫癥的我打算修復(fù)好它
百度了一下,說(shuō)什么子組件改變了prop的值,但是我并沒(méi)有改變prop的值
經(jīng)過(guò)一系列查詢最終發(fā)現(xiàn)和elementUI版本有關(guān)
目前親測(cè)可用版本為??2.15.6 注意前面不要加 ^ 符號(hào)

科普小知識(shí)
指定版本號(hào)
(1)指定版本:比如"vue": "2.15.2",表示指定安裝2.15.2的版本
(2)波浪號(hào)~ 指定版本:比如 "vue": "~2.15.2",表示安裝2.5.x的最新版本(不低于2.15.2),但是不安裝2.16.x,也就是說(shuō)安裝時(shí)不改變大版本號(hào)和次要版本號(hào)
(3)^ 指定版本:比如 "vue": "^2.15.2" ,表示安裝2.5.2及以上的版本,但是不安裝3.0.0,也就是說(shuō)安裝時(shí)不改變大版本號(hào)。