<a-input
placeholder="请输入用户名"
:maxLength="20"
v-decorator="[
'username',
{
rules: [{ required: true, message: '请输入用户名' },
{ min: 5, max: 20, message: '长度5-20字符', trigger: 'blur' },
{
pattern:/^w+$/g,
message:'请输入正确的用户名,字母/数字/下划线,'
}],
validateTrigger: 'change',
initialValue: username, // 默认值设置
},
]"
/>