[Vue warn]: Invalid prop: type check failed for prop "clearable". Expected Boolean, got String 的錯誤

 爲了在單選時能夠情況已選擇的內容,加了 clearable 這個屬性,查看element 官方文檔的時候,內容如下圖所示,說默認值是 false ,於是加入是對其賦值 true,然後報了下面的錯誤。   解決的辦法是,實際上並不用加 true,直接寫上這個clearable就行,看似很簡單的問題,有時候也會招不到解決辦法,希望看到這篇博文的人有所啓發。 
相關文章
相關標籤/搜索