Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web_component
submodule
Commits
ad7a7b13
Commit
ad7a7b13
authored
Sep 09, 2020
by
zhuyangbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备注字段
parent
94ae04ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
index.less
components/apolloTable/editFormV3/index.less
+5
-0
index.tsx
components/apolloTable/editFormV3/index.tsx
+19
-9
No files found.
components/apolloTable/editFormV3/index.less
View file @
ad7a7b13
...
...
@@ -41,6 +41,11 @@
.itemTitle {
margin-left: @marginSm;
color: @textPrimaryColor;
margin-right: 2px;
}
.remarkIcon{
color: #AEB4BA;
cursor: pointer;
}
}
}
...
...
components/apolloTable/editFormV3/index.tsx
View file @
ad7a7b13
...
...
@@ -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 {
<
span
className=
{
styles
.
titleContainer
}
>
{
/* icon && <div className={styles.colIcon}>{icon}</div> */
}
<
span
className=
{
styles
.
itemTitle
}
>
{
item
.
columnChsName
}
</
span
>
{
item
.
columnAttrObj
?.
remark
&&
(
<
Tooltip
title=
{
item
.
columnAttrObj
?.
remark
}
>
<
InconFont
type=
"iconwenhao"
className=
{
styles
.
remarkIcon
}
/>
</
Tooltip
>
)
}
</
span
>
);
};
...
...
@@ -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
(
<
Provider
value=
{
{
locale
:
this
.
getContext
()
}
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment