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 }]"/>