|
@@ -398,8 +398,11 @@ const List = (editType) => {
|
|
|
},
|
|
|
renderCell: (item, rowId, columnId) => {
|
|
|
if (rowId == editRowId && editType.edit == "true" && editColumnId == columnId) {
|
|
|
- return <Input type="text" defaultValue={item.姓名.label} style={{ width: "100%" }} onChange={(e) => {
|
|
|
+ return <Input type="text" defaultValue={item.姓名.label} style={{ width: "100%" }} autoFocus onChange={(e) => {
|
|
|
item.姓名.label = e.target.value;
|
|
|
+ }} onBlur={() => {
|
|
|
+ setEditRowId(-1);
|
|
|
+ setEditColumnId(-1);
|
|
|
}} />;
|
|
|
} else {
|
|
|
return item.姓名.label;
|
|
@@ -422,8 +425,11 @@ const List = (editType) => {
|
|
|
},
|
|
|
renderCell: (item, rowId, columnId) => {
|
|
|
if (rowId == editRowId && editType.edit == "true" && editColumnId == columnId) {
|
|
|
- return <Input type="number" defaultValue={item.序号.label} style={{ width: "100%" }} onChange={(e) => {
|
|
|
+ return <Input type="number" defaultValue={item.序号.label} style={{ width: "100%" }} autoFocus onChange={(e) => {
|
|
|
item.序号.label = e.target.value;
|
|
|
+ }} onBlur={() => {
|
|
|
+ setEditRowId(-1);
|
|
|
+ setEditColumnId(-1);
|
|
|
}} />;
|
|
|
} else {
|
|
|
return item.序号.label;
|
|
@@ -446,9 +452,12 @@ const List = (editType) => {
|
|
|
},
|
|
|
renderCell: (item, rowId, columnId) => {
|
|
|
if (rowId == editRowId && editType.edit == "true" && editColumnId == columnId) {
|
|
|
- return <Select style={{ width: "calc(100% - 70px)" }} onChange={(e) => {
|
|
|
+ return <Select style={{ width: "calc(100% - 70px)" }} autoFocus onChange={(e) => {
|
|
|
item.性别.label = e.target.value;
|
|
|
- }}>
|
|
|
+ }} onBlur={() => {
|
|
|
+ setEditRowId(-1);
|
|
|
+ setEditColumnId(-1);
|
|
|
+ }} >
|
|
|
<option value="男" selected={item.性别.label == "男"}>男</option>
|
|
|
<option value="女" selected={item.性别.label == "女"}>女</option>
|
|
|
</Select>;
|
|
@@ -473,8 +482,11 @@ const List = (editType) => {
|
|
|
|
|
|
renderCell: (item, rowId, columnId) => {
|
|
|
if (rowId == editRowId && editType.edit == "true" && editColumnId == columnId) {
|
|
|
- return <Input type="text" defaultValue={item.年龄.label} style={{ width: "100%" }} onChange={(e) => {
|
|
|
+ return <Input type="text" defaultValue={item.年龄.label} style={{ width: "100%" }} autoFocus onChange={(e) => {
|
|
|
item.年龄.label = e.target.value;
|
|
|
+ }} onBlur={() => {
|
|
|
+ setEditRowId(-1);
|
|
|
+ setEditColumnId(-1);
|
|
|
}} />;
|
|
|
} else {
|
|
|
return item.年龄.label;
|
|
@@ -496,8 +508,11 @@ const List = (editType) => {
|
|
|
},
|
|
|
renderCell: (item, rowId, columnId) => {
|
|
|
if (rowId == editRowId && editType.edit == "true" && editColumnId == columnId) {
|
|
|
- return <Input type="date" defaultValue={item.最后在线时间.label} onChange={(e) => {
|
|
|
+ return <Input type="date" defaultValue={item.最后在线时间.label} autoFocus onChange={(e) => {
|
|
|
item.最后在线时间.label = e.target.value;
|
|
|
+ }} onBlur={() => {
|
|
|
+ setEditRowId(-1);
|
|
|
+ setEditColumnId(-1);
|
|
|
}} />;
|
|
|
} else {
|
|
|
return item.最后在线时间.label;
|