Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apollo_form_pase
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
apollo_form_pase
Commits
1c617bf0
Commit
1c617bf0
authored
Nov 01, 2019
by
满振华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改表单pase
parent
a1040280
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
index.js
src/index.js
+8
-7
No files found.
src/index.js
View file @
1c617bf0
...
@@ -9,11 +9,12 @@ class HandleBehavior {
...
@@ -9,11 +9,12 @@ class HandleBehavior {
}
}
if
(
!
this
.
formData
)
return
if
(
!
this
.
formData
)
return
this
.
hiddenFilds
();
this
.
hiddenFilds
();
this
.
formData
.
map
(
item
=>
{
fi
if
(
!
item
.
behaviors
||
!
Array
.
isArray
(
item
.
behaviors
)
||
item
.
behaviors
.
length
===
0
)
return
;
// this.formData.map(item => {
const
value
=
this
.
handleFormaterValue
(
item
.
value
,
item
);
// if (!item.behaviors || !Array.isArray(item.behaviors) || item.behaviors.length === 0) return;
this
.
handleBehavior
({
currentValue
:
value
,
componentData
:
item
,
handleType
:
'init'
})
// const value = this.handleFormaterValue(item.value, item);
})
// this.handleBehavior({ currentValue: value, componentData: item, handleType: 'init' })
// })
return
this
;
return
this
;
}
}
getFormData
=
()
=>
{
getFormData
=
()
=>
{
...
@@ -55,9 +56,9 @@ class HandleBehavior {
...
@@ -55,9 +56,9 @@ class HandleBehavior {
const
behaviorInstance
=
HandleClass
[
behavior
.
behaviorValue
];
const
behaviorInstance
=
HandleClass
[
behavior
.
behaviorValue
];
if
(
!
behaviorInstance
||
!
behaviorInstance
.
fun
)
return
;
if
(
!
behaviorInstance
||
!
behaviorInstance
.
fun
)
return
;
let
formData
=
this
.
formData
;
let
formData
=
this
.
formData
;
this
.
formData
=
behaviorInstance
.
fun
({
value
,
behavior
,
behaviors
,
formData
,
componentData
,
handleType
},
this
.
rese
r
tValueCallback
);
this
.
formData
=
behaviorInstance
.
fun
({
value
,
behavior
,
behaviors
,
formData
,
componentData
,
handleType
},
this
.
resetValueCallback
);
}
}
rese
r
tValueCallback
=
({
key
,
value
})
=>
{
resetValueCallback
=
({
key
,
value
})
=>
{
const
componentData
=
this
.
formData
.
find
(
ls
=>
ls
.
name
===
key
)
||
{};
const
componentData
=
this
.
formData
.
find
(
ls
=>
ls
.
name
===
key
)
||
{};
this
.
handleBehavior
({
currentValue
:
value
,
componentData
})
this
.
handleBehavior
({
currentValue
:
value
,
componentData
})
}
}
...
...
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