diff --git a/.gitignore b/.gitignore
index bdba67fc8fb7b7f8e321508ec03ef324f7079070..aa3fce5825a412febff24ef3bf577105b08862ec 100755
--- a/.gitignore
+++ b/.gitignore
@@ -18,4 +18,5 @@ yarn-error.log
.idea
yarn.lock
package-lock.json
+*bak
jsconfig.json
diff --git a/src/routes/List/TableList.js b/src/routes/List/TableList.js
index 2cc077751783007174c9f0a33391638b5f4a04af..54577f02d23d7b4c2802e67a95b63350b320bc58 100644
--- a/src/routes/List/TableList.js
+++ b/src/routes/List/TableList.js
@@ -10,6 +10,36 @@ const FormItem = Form.Item;
const { Option } = Select;
const getValue = obj => Object.keys(obj).map(key => obj[key]).join(',');
+const CreateForm = Form.create()((props) => {
+ const { modalVisible, addInputValue, parent, form } = props;
+ const okHandle = () => {
+ form.validateFields((err/* , fieldsValue */) => {
+ if (err) return;
+ parent.handleAdd();
+ });
+ };
+ return (
+ parent.handleModalVisible()}
+ >
+
+ {form.getFieldDecorator('desc', {
+ rules: [{ required: true, message: 'Please input some description...' }],
+ })(
+
+ )}
+
+
+ );
+});
+
@connect(({ rule, loading }) => ({
rule,
loading: loading.models.rule,
@@ -279,6 +309,12 @@ export default class TableList extends PureComponent {
);
+ const parentMethods = {
+ handleAdd: this.handleAdd,
+ handleModalVisible: this.handleModalVisible,
+ handleAddInput: this.handleAddInput,
+ };
+
return (
@@ -312,20 +348,11 @@ export default class TableList extends PureComponent {
/>
- this.handleModalVisible()}
- >
-
-
-
-
+
);
}