首页 > 其他 > 详细

antD vue 遇到的一些警告处理

时间:2020-10-13 14:59:36      阅读:87      评论:0      收藏:0      [点我收藏+]

1.

<a-input placeholder="请输入管理员姓名"
         maxLength="50"
         v-decorator="[‘realName‘,{ rules: [{ required: true, message: ‘管理员姓名不能为空‘ }],‘initialValue‘:info.realName }]"/>

 

Invalid prop: type check failed for prop "maxLength". Expected Number with value 50, got String with value "50"

道具无效:道具“maxLength”类型检查失败。期望值为50的数字,得到值为“50”的字符串。

场景:使用a-input设置属性值maxLength报出的警告

解决:将 maxLength="50"改成 :maxLength="50"

<a-input placeholder="请输入管理员姓名"
         :maxLength="50"
         v-decorator="[‘realName‘,{ rules: [{ required: true, message: ‘管理员姓名不能为空‘ }],‘initialValue‘:info.realName }]"/>

 

antD vue 遇到的一些警告处理

原文:https://www.cnblogs.com/cuteCoderSnow/p/13808420.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!