Vue:Invalid prop: type check failed for prop "clearable". Expected Boolean, got String

最近更新時間 2020-02-17 13:32:51

輸入框為了能清除內容加了clearable屬性,設置clearable=true或者clearable="true",出現以下提示錯誤:

Invalid prop: type check failed for prop "clearable". Expected Boolean, got String with value "true"

解決辦法是,設置clearable時不用加true或者"true",如下所示:

<el-input
  placeholder="請輸入內容"
  v-model="input"
  clearable>
</el-input>

 

出現以下錯誤:

Property or method "attr" is not defined on the instance but referenced during render. Make sure that this property is reactive

表示attr屬性或方法沒有定義,在data或methods中定義即可。

vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: type check failed for prop "showClose". Expected Boolean, got String with value "false".

:show-close="false"

rss_feed