|
@@ -4,7 +4,7 @@ import { Input, Row, Col } from 'antd'
|
|
|
import React, { useState, useEffect, useRef } from 'react'
|
|
import React, { useState, useEffect, useRef } from 'react'
|
|
|
import './index.less'
|
|
import './index.less'
|
|
|
|
|
|
|
|
-const EditableFormItem = ({ label, dataIndex, record, dataId, width = '100%' }) => {
|
|
|
|
|
|
|
+const EditableFormItem = ({ label, dataIndex, record, dataId, span = 24 }) => {
|
|
|
const [editing, setEditing] = useState(false)
|
|
const [editing, setEditing] = useState(false)
|
|
|
const inputRef = useRef(null)
|
|
const inputRef = useRef(null)
|
|
|
const [val, setVal] = useState(record)
|
|
const [val, setVal] = useState(record)
|
|
@@ -46,12 +46,14 @@ const EditableFormItem = ({ label, dataIndex, record, dataId, width = '100%' })
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <Row style={{ width }}>
|
|
|
|
|
- <Col span={2} className="zh-text-right zh-mg-bottom-8">
|
|
|
|
|
- <span className="zh-lh-32 zh-mg-right-10">{label}:</span>
|
|
|
|
|
- </Col>
|
|
|
|
|
- <Col span={22}>{cell}</Col>
|
|
|
|
|
- </Row>
|
|
|
|
|
|
|
+ <Col span={span}>
|
|
|
|
|
+ <Row>
|
|
|
|
|
+ <Col span={2} className="zh-text-right zh-mg-bottom-8">
|
|
|
|
|
+ <span className="zh-lh-32 zh-mg-right-10">{label}:</span>
|
|
|
|
|
+ </Col>
|
|
|
|
|
+ <Col span={22}>{cell}</Col>
|
|
|
|
|
+ </Row>
|
|
|
|
|
+ </Col>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|