antD vue 遇到的一些警告处理
作者:互联网
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 }]"/>
标签:vue,道具,50,value,prop,maxLength,antD,警告 来源: https://www.cnblogs.com/cuteCoderSnow/p/13808420.html