diff --git a/src/routes/Forms/TableForm.js b/src/routes/Forms/TableForm.js
index 28a758d2cc74037c2b140b18a72a3bb3399f7902..44f9133961a96b274ff9ecece068566d5b487737 100644
--- a/src/routes/Forms/TableForm.js
+++ b/src/routes/Forms/TableForm.js
@@ -89,11 +89,12 @@ export default class TableForm extends PureComponent {
return;
}
const target = this.getRowByKey(key);
- delete target.isNew;
if (!target.workId || !target.name || !target.department) {
message.error('请填写完整成员信息。');
+ e.target.focus();
return;
}
+ delete target.isNew;
this.toggleEditable(e, key);
this.props.onChange(this.state.data);
}, 10);
@@ -176,15 +177,17 @@ export default class TableForm extends PureComponent {
if (record.isNew) {
return (
- this.saveRow(e, record.key)}>保存
+ 保存
- this.remove(e, record.key)}>删除
+ this.remove(record.key)}>
+ 删除
+
);
}
return (
- this.saveRow(e, record.key)}>保存
+ 保存
this.cancel(e, record.key)}>取消