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
eb698edb
Commit
eb698edb
authored
Aug 17, 2021
by
manzhenhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修噶爱
parent
253d1568
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
index.tsx
components/apolloTable/editForm/index.tsx
+2
-1
index.tsx
components/apolloTable/editFormV3/index.tsx
+3
-2
No files found.
components/apolloTable/editForm/index.tsx
View file @
eb698edb
...
@@ -33,6 +33,7 @@ const EditForm = (props: any) => {
...
@@ -33,6 +33,7 @@ const EditForm = (props: any) => {
rules
=
[],
rules
=
[],
validateFirst
=
true
,
validateFirst
=
true
,
validateTrigger
=
'onChange'
,
validateTrigger
=
'onChange'
,
renderLabel
,
}
=
item
;
}
=
item
;
let
detailConfig
:
any
;
let
detailConfig
:
any
;
if
(
typeof
renderEditForm
===
'function'
)
{
if
(
typeof
renderEditForm
===
'function'
)
{
...
@@ -50,7 +51,7 @@ const EditForm = (props: any) => {
...
@@ -50,7 +51,7 @@ const EditForm = (props: any) => {
<
FormItem
<
FormItem
name=
{
columnName
}
name=
{
columnName
}
key=
{
columnName
}
key=
{
columnName
}
label=
{
columnChsName
}
label=
{
renderLabel
?
renderLabel
(
columnChsName
)
:
columnChsName
}
rules=
{
[{
required
:
!!
item
.
requiredFlag
},
...
rules
]
}
rules=
{
[{
required
:
!!
item
.
requiredFlag
},
...
rules
]
}
initialValue=
{
getFormat
(
detailConfig
,
item
,
value
)
}
initialValue=
{
getFormat
(
detailConfig
,
item
,
value
)
}
validateFirst=
{
validateFirst
}
validateFirst=
{
validateFirst
}
...
...
components/apolloTable/editFormV3/index.tsx
View file @
eb698edb
...
@@ -89,7 +89,7 @@ class FormWrap extends Component {
...
@@ -89,7 +89,7 @@ class FormWrap extends Component {
return
(
return
(
<
span
className=
{
s
.
titleContainer
}
>
<
span
className=
{
s
.
titleContainer
}
>
{
/* icon && <div className={s.colIcon}>{icon}</div> */
}
{
/* 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
&&
(
{
item
.
columnAttrObj
?.
remark
&&
(
<
Tooltip
title=
{
item
.
columnAttrObj
?.
remark
}
>
<
Tooltip
title=
{
item
.
columnAttrObj
?.
remark
}
>
<
IconFont
type=
"iconwenhao"
className=
{
s
.
remarkIcon
}
/>
<
IconFont
type=
"iconwenhao"
className=
{
s
.
remarkIcon
}
/>
...
@@ -131,6 +131,7 @@ class FormWrap extends Component {
...
@@ -131,6 +131,7 @@ class FormWrap extends Component {
dynamicCellConfigDTO
,
dynamicCellConfigDTO
,
cellRenderProps
,
cellRenderProps
,
requiredFlag
,
requiredFlag
,
renderLabel
,
}
=
item
;
}
=
item
;
let
detailConfig
:
any
;
let
detailConfig
:
any
;
if
(
typeof
renderEditForm
===
'function'
)
{
if
(
typeof
renderEditForm
===
'function'
)
{
...
@@ -311,7 +312,7 @@ class FormWrap extends Component {
...
@@ -311,7 +312,7 @@ class FormWrap extends Component {
}
}
function
mapPropsToFields
(
props
)
{
function
mapPropsToFields
(
props
)
{
const
{
data
,
rowData
}
=
props
;
const
{
data
,
rowData
}
=
props
;
const
returnObj
:
any
=
{};
const
returnObj
:
any
=
{};
if
(
!
data
||
typeof
data
!==
'object'
)
return
returnObj
;
if
(
!
data
||
typeof
data
!==
'object'
)
return
returnObj
;
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
const
col
=
data
[
key
];
const
col
=
data
[
key
];
...
...
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