Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaojuan huang
Ccms
Commits
6c3284b1
Commit
6c3284b1
authored
3 years ago
by
wangailin
Browse files
Options
Download
Email Patches
Plain Diff
feat: 置空添加前置逻辑
parent
ccb8d3e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/components/formFields/form/index.tsx
+1
-1
src/components/formFields/form/index.tsx
src/components/formFields/group/index.tsx
+1
-1
src/components/formFields/group/index.tsx
src/components/formFields/tabs/index.tsx
+1
-1
src/components/formFields/tabs/index.tsx
src/steps/form/index.tsx
+1
-1
src/steps/form/index.tsx
with
4 additions
and
4 deletions
+4
-4
src/components/formFields/form/index.tsx
+
1
-
1
View file @
6c3284b1
...
...
@@ -499,7 +499,7 @@ export default class FormField extends Field<FormFieldConfig, IFormField, Array<
if
(
!
ConditionHelper
(
formFieldConfig
.
condition
,
{
record
:
itemValue
,
data
:
this
.
props
.
data
,
step
:
this
.
props
.
step
}))
{
if
(
!
this
.
formFieldsMountedList
[
index
])
this
.
formFieldsMountedList
[
index
]
=
[]
this
.
formFieldsMountedList
[
index
][
fieldIndex
]
=
false
this
.
formFieldsList
[
index
][
fieldIndex
]
=
null
this
.
formFieldsList
[
index
]
&&
(
this
.
formFieldsList
[
index
]
[
fieldIndex
]
=
null
)
return
null
}
const
FormField
=
this
.
getALLComponents
(
formFieldConfig
.
type
)
||
Field
...
...
This diff is collapsed.
Click to expand it.
src/components/formFields/group/index.tsx
+
1
-
1
View file @
6c3284b1
...
...
@@ -314,7 +314,7 @@ export default class GroupField extends Field<GroupFieldConfig, IGroupField, any
?
(
this
.
props
.
config
.
fields
||
[]).
map
((
formFieldConfig
,
formFieldIndex
)
=>
{
if
(
!
ConditionHelper
(
formFieldConfig
.
condition
,
{
record
:
value
,
data
:
this
.
props
.
data
,
step
:
this
.
props
.
step
}))
{
this
.
formFieldsMounted
[
formFieldIndex
]
=
false
this
.
formFields
[
formFieldIndex
]
=
null
this
.
formFields
&&
(
this
.
formFields
[
formFieldIndex
]
=
null
)
return
null
}
let
hidden
:
boolean
=
true
...
...
This diff is collapsed.
Click to expand it.
src/components/formFields/tabs/index.tsx
+
1
-
1
View file @
6c3284b1
...
...
@@ -383,7 +383,7 @@ export default class TabsField<S> extends Field<TabsFieldConfig, ITabsField, { [
if
(
!
ConditionHelper
(
formFieldConfig
.
condition
,
{
record
:
this
.
props
.
record
,
data
:
this
.
props
.
data
,
step
:
this
.
props
.
step
}))
{
if
(
!
this
.
formFieldsMountedList
[
index
])
this
.
formFieldsMountedList
[
index
]
=
[]
this
.
formFieldsMountedList
[
index
][
formFieldIndex
]
=
false
this
.
formFieldsList
[
index
][
formFieldIndex
]
=
null
this
.
formFieldsList
[
index
]
&&
(
this
.
formFieldsList
[
index
]
[
formFieldIndex
]
=
null
)
return
null
}
let
hidden
:
boolean
=
true
...
...
This diff is collapsed.
Click to expand it.
src/steps/form/index.tsx
+
1
-
1
View file @
6c3284b1
...
...
@@ -660,7 +660,7 @@ export default class FormStep extends Step<FormConfig, FormState> {
children
:
fields
.
map
((
formFieldConfig
,
formFieldIndex
)
=>
{
if
(
!
ConditionHelper
(
formFieldConfig
.
condition
,
{
record
:
formValue
,
data
,
step
}))
{
this
.
formFieldsMounted
[
formFieldIndex
]
=
false
this
.
formFields
[
formFieldIndex
]
=
null
this
.
formFields
&&
(
this
.
formFields
[
formFieldIndex
]
=
null
)
return
null
}
let
hidden
:
boolean
=
true
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help