Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
pub
yapi
Commits
144a9167
Unverified
Commit
144a9167
authored
Oct 11, 2020
by
sean1025
Committed by
GitHub
Oct 11, 2020
Browse files
Merge pull request #1497 from tangcent/fix#1493
fix: use `sub` instead of `split` to parse parameters
parents
bc77adc2
5e5c0097
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js
...ners/Project/Interface/InterfaceList/InterfaceEditForm.js
+6
-3
No files found.
client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js
View file @
144a9167
...
...
@@ -548,9 +548,12 @@ class InterfaceEditForm extends Component {
this
.
state
.
bulkValue
.
split
(
'
\n
'
).
forEach
((
item
,
index
)
=>
{
let
valueItem
=
Object
.
assign
({},
curValue
[
index
]
||
dataTpl
[
this
.
state
.
bulkName
]);
valueItem
.
name
=
item
.
split
(
'
:
'
)[
0
];
valueItem
.
example
=
item
.
split
(
'
:
'
)[
1
]
||
''
;
newValue
.
push
(
valueItem
);
let
indexOfColon
=
item
.
indexOf
(
'
:
'
);
if
(
indexOfColon
!==-
1
)
{
valueItem
.
name
=
item
.
substring
(
0
,
indexOfColon
);
valueItem
.
example
=
item
.
substring
(
indexOfColon
+
1
)
||
''
;
newValue
.
push
(
valueItem
);
}
});
this
.
props
.
form
.
setFieldsValue
({[
this
.
state
.
bulkName
]:
newValue
});
...
...
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