lanjianrong 5 lat temu
rodzic
commit
78a509bbe5
1 zmienionych plików z 9 dodań i 3 usunięć
  1. 9 3
      src/components/EditableForm/editableFormItem.jsx

+ 9 - 3
src/components/EditableForm/editableFormItem.jsx

@@ -67,15 +67,21 @@ const EditableFormItem = ({ label, dataIndex, record, dataId, span, editCellType
         // cell = ()
         break
       case 'select':
+        const options = (
+          <>
+            <Option key="男" vlaue="男">男</Option>
+            <Option key="女" vlaue="女">女</Option>
+          </>
+        )
         cell = (
           <Select
-            defaultValue="男"
+            defaultValue={val}
             ref={inputRef}
             onBlur={save}
             onChange={handleSelectChange}
+            className="zh-width-100P"
           >
-            <Option vlaue="男">男</Option>
-            <Option vlaue="女">女</Option>
+            {options}
           </Select>
         )
         break