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

最近更新时间 2021-06-27 15:10:28

输入框为了能清除内容加了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