lanjianrong hace 5 años
padre
commit
78a509bbe5
Se han modificado 1 ficheros con 9 adiciones y 3 borrados
  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 = ()
         // cell = ()
         break
         break
       case 'select':
       case 'select':
+        const options = (
+          <>
+            <Option key="男" vlaue="男">男</Option>
+            <Option key="女" vlaue="女">女</Option>
+          </>
+        )
         cell = (
         cell = (
           <Select
           <Select
-            defaultValue="男"
+            defaultValue={val}
             ref={inputRef}
             ref={inputRef}
             onBlur={save}
             onBlur={save}
             onChange={handleSelectChange}
             onChange={handleSelectChange}
+            className="zh-width-100P"
           >
           >
-            <Option vlaue="男">男</Option>
-            <Option vlaue="女">女</Option>
+            {options}
           </Select>
           </Select>
         )
         )
         break
         break