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"

可能喜欢
最近浏览
正在加载浏览记录