Commit eb698edb authored by manzhenhua's avatar manzhenhua

修噶爱

parent 253d1568
......@@ -33,6 +33,7 @@ const EditForm = (props: any) => {
rules = [],
validateFirst = true,
validateTrigger = 'onChange',
renderLabel,
} = item;
let detailConfig: any;
if (typeof renderEditForm === 'function') {
......@@ -50,7 +51,7 @@ const EditForm = (props: any) => {
<FormItem
name={columnName}
key={columnName}
label={columnChsName}
label={renderLabel ? renderLabel(columnChsName) : columnChsName}
rules={[{ required: !!item.requiredFlag }, ...rules]}
initialValue={getFormat(detailConfig, item, value)}
validateFirst={validateFirst}
......
......@@ -89,7 +89,7 @@ class FormWrap extends Component {
return (
<span className={s.titleContainer}>
{/* icon && <div className={s.colIcon}>{icon}</div> */}
<span className={s.itemTitle}>{item.columnChsName}</span>
<span className={s.itemTitle}>{item.renderLabel ? item.renderLabel(item.columnChsName) : item.columnChsName}</span>
{item.columnAttrObj?.remark && (
<Tooltip title={item.columnAttrObj?.remark}>
<IconFont type="iconwenhao" className={s.remarkIcon} />
......@@ -131,6 +131,7 @@ class FormWrap extends Component {
dynamicCellConfigDTO,
cellRenderProps,
requiredFlag,
renderLabel,
} = item;
let detailConfig: any;
if (typeof renderEditForm === 'function') {
......@@ -311,7 +312,7 @@ class FormWrap extends Component {
}
function mapPropsToFields(props) {
const { data, rowData } = props;
const returnObj:any = {};
const returnObj: any = {};
if (!data || typeof data !== 'object') return returnObj;
Object.keys(data).forEach((key) => {
const col = data[key];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment