From ad7a7b13401d4e5a91a81964612e4dccdb4a9374 Mon Sep 17 00:00:00 2001 From: zhuyangbin Date: Wed, 9 Sep 2020 15:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/apolloTable/editFormV3/index.less | 5 ++++ components/apolloTable/editFormV3/index.tsx | 28 +++++++++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/components/apolloTable/editFormV3/index.less b/components/apolloTable/editFormV3/index.less index 624b369..9f2fffd 100644 --- a/components/apolloTable/editFormV3/index.less +++ b/components/apolloTable/editFormV3/index.less @@ -41,6 +41,11 @@ .itemTitle { margin-left: @marginSm; color: @textPrimaryColor; + margin-right: 2px; + } + .remarkIcon{ + color: #AEB4BA; + cursor: pointer; } } } diff --git a/components/apolloTable/editFormV3/index.tsx b/components/apolloTable/editFormV3/index.tsx index 5513a9d..a08cc7c 100644 --- a/components/apolloTable/editFormV3/index.tsx +++ b/components/apolloTable/editFormV3/index.tsx @@ -14,10 +14,11 @@ * 失去焦点:onBlurFn * */ import React, { Component } from 'react'; -import { Form, Button } from 'antd'; +import { Form, Button, Tooltip } from 'antd'; import { emptyModel } from '@/submodule/components/apolloTable/component/base/_utils/setFormatter'; import { defaultLocale } from '@/submodule/components/apolloTable/locale'; import _ from 'lodash'; +import InconFont from '@/submodule/components/IconFont/IconFont'; import styles from './index.less'; import { config } from '../component/base/config'; import { transferAttr } from '../component/base/_utils/transferAttr'; @@ -32,7 +33,9 @@ class FormWrap extends Component { handleSubmit = (e) => { e.preventDefault(); e.stopPropagation(); - const { rowId, form, handleSubmit, data, rowData, detailType } = this.props; + const { + rowId, form, handleSubmit, data, rowData, detailType, + } = this.props; form.validateFieldsAndScroll((err, values) => { if (!err) { const newValues: any[] = []; @@ -85,6 +88,11 @@ class FormWrap extends Component { {/* icon &&
{icon}
*/} {item.columnChsName} + {item.columnAttrObj?.remark && ( + + + + )}
); }; @@ -93,12 +101,12 @@ class FormWrap extends Component { // 可输可选组件清空时数据格式有问题,单独处理一下 if (item.requiredFlag && Number(item.columnType) === 15 && typeof value === 'object') { if ( - !value.label && - value.label !== 0 && - !value.text && - value.text !== 0 && - !value.value && - value.value !== 0 + !value.label + && value.label !== 0 + && !value.text + && value.text !== 0 + && !value.value + && value.value !== 0 ) { return callback('必填项不能为空'); } @@ -202,7 +210,9 @@ class FormWrap extends Component { }; render() { - const { loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn } = this.props; + const { + loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn, + } = this.props; return ( -- 2.21.0