Skip to content

input select radio设置了initialValue值,第一次进来form.getFieldValue获取的值是空的,不是initialValue设置的值,改变了表单元素里面任意值后,form.getFieldValue就获取有值 #1694

@xiaofuliang

Description

@xiaofuliang
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.4.10

Environment

antd-vue 1.4.10 vue 2.6.10

Reproduction link

Steps to reproduce

下面代码:
<a-form-item label="用户账号" > <a-input placeholder="请输入用户账号" v-decorator="[ 'username', {rules: [{ required: true, message: '请输入用户账号!' }], initialValue:'admin'}]"> </a-input> </a-form-item> {{form.getFieldValue('username')}}

What is expected?

设置了initialValue:'admin',希望进来 {{form.getFieldValue('username')}}显示 admin

What is actually happening?

显示空

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions