Invalid prop: type check failed for prop “maxLength“. Expected Number, got String.

问题背景:使用Element-ui of Vue的input表单的maxlength属性报错

<el-input
  type="text"
  placeholder="请输入内容"
  v-model="text"
  maxlength="10"
  show-word-limit
>

解决方法:

maxlength="10"

改为:

 :maxlength="10"

猜你喜欢

转载自blog.csdn.net/qinqinzqq/article/details/128128998