diff --git a/src/routes/Forms/StepForm/Step1.js b/src/routes/Forms/StepForm/Step1.js
index 5acdd406a1e2fab914e305bd8bc6ac64b4099d55..20379b961b33e25edd97a3eff36bb90eb5e66025 100644
--- a/src/routes/Forms/StepForm/Step1.js
+++ b/src/routes/Forms/StepForm/Step1.js
@@ -5,7 +5,7 @@ import styles from './style.less';
const { Option } = Select;
-export default ({ formItemLayout, form, dispatch }) => {
+export default ({ formItemLayout, form, dispatch, data }) => {
const { getFieldDecorator, validateFields } = form;
const onValidateForm = () => {
validateFields((err, values) => {
@@ -26,7 +26,7 @@ export default ({ formItemLayout, form, dispatch }) => {
label="付款账户"
>
{getFieldDecorator('payAccount', {
- initialValue: 'ant-design@alipay.com',
+ initialValue: data.payAccount || 'ant-design@alipay.com',
rules: [{ required: true, message: '请选择付款账户' }],
})(
{getFieldDecorator('receiverAccount', {
- initialValue: 'test@example.com',
+ initialValue: data.receiverAccount || 'test@example.com',
rules: [
{ required: true, message: '请输入收款人账户' },
{ type: 'email', message: '账户名应为邮箱格式' },
@@ -59,7 +59,7 @@ export default ({ formItemLayout, form, dispatch }) => {
label="收款人姓名"
>
{getFieldDecorator('receiverName', {
- initialValue: 'Alex',
+ initialValue: data.receiverName || 'Alex',
rules: [{ required: true, message: '请输入收款人姓名' }],
})(
@@ -70,7 +70,7 @@ export default ({ formItemLayout, form, dispatch }) => {
label="转账金额"
>
{getFieldDecorator('amount', {
- initialValue: '500',
+ initialValue: data.amount || '500',
rules: [
{ required: true, message: '请输入转账金额' },
{ pattern: /^(\d+)((?:\.\d+)?)$/, message: '请输入合法金额数字' },