From 41501ad033f763044a202fb7e11dfd18e46426ef Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Mon, 12 Oct 2020 16:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20hotfix:=20fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../ListTableList/components/UpdateForm.tsx | 217 ++++++++---------- 2 files changed, 100 insertions(+), 119 deletions(-) diff --git a/package.json b/package.json index a44c52bf..e8621d81 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "dependencies": { "@ant-design/icons": "^4.0.0", "@ant-design/pro-descriptions": "^1.0.19", - "@ant-design/pro-form": "^1.0.1", + "@ant-design/pro-form": "^1.0.2", "@ant-design/pro-layout": "^6.4.19", "@ant-design/pro-table": "^2.8.1", "@umijs/route-utils": "^1.0.33", diff --git a/src/pages/ListTableList/components/UpdateForm.tsx b/src/pages/ListTableList/components/UpdateForm.tsx index 704eff25..7ab3c6c0 100644 --- a/src/pages/ListTableList/components/UpdateForm.tsx +++ b/src/pages/ListTableList/components/UpdateForm.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React from 'react'; import { Modal } from 'antd'; import { ProFormSelect, @@ -26,128 +26,109 @@ export interface UpdateFormProps { values: Partial; } -export interface UpdateFormState { - formVals: FormValueType; - currentStep: number; -} - -const UpdateForm: React.FC = (props) => { - const [formValues] = useState({ - name: props.values.name, - desc: props.values.desc, - key: props.values.key, - target: '0', - template: '0', - type: '1', - time: '', - frequency: 'month', - }); - - const { onCancel: handleUpdateModalVisible, updateModalVisible } = props; - - return ( - = (props) => ( + { + return ( + props.onCancel()} + > + {dom} + + ); + }} + onFinish={props.onSubmit} + > + { - return ( - handleUpdateModalVisible()} - > - {dom} - - ); + title="基本信息" + > + + + + - - - - - + - - - - - + + + + + - - - - - ); -}; + /> + + +); export default UpdateForm;