Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
黄庭坚
jinfa-platform
Commits
075a9b83
Commit
075a9b83
authored
Apr 21, 2022
by
rainbowmorel@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式修改
parent
3f8292df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
form.ts
src/utils/form.ts
+2
-2
No files found.
src/utils/form.ts
View file @
075a9b83
...
@@ -4,7 +4,7 @@ export function HandelFormFieldsKeyValue(fields) {
...
@@ -4,7 +4,7 @@ export function HandelFormFieldsKeyValue(fields) {
let
result
=
{}
let
result
=
{}
for
(
const
field
in
fields
)
{
for
(
const
field
in
fields
)
{
const
split
=
field
.
split
(
'.'
);
const
split
=
field
.
split
(
'.'
);
if
(
split
.
length
>
1
)
{
if
(
split
.
length
>
1
)
{
//为空的时候创建一个默认对象
//为空的时候创建一个默认对象
if
(
result
[
split
[
0
]]
===
undefined
)
{
if
(
result
[
split
[
0
]]
===
undefined
)
{
...
@@ -13,7 +13,7 @@ export function HandelFormFieldsKeyValue(fields) {
...
@@ -13,7 +13,7 @@ export function HandelFormFieldsKeyValue(fields) {
result
[
split
[
0
]][
split
[
1
]]
=
momentFormatValue
(
fields
[
field
]);
result
[
split
[
0
]][
split
[
1
]]
=
momentFormatValue
(
fields
[
field
]);
}
else
{
}
else
{
if
([
'deliveryRangeTime'
].
includes
(
field
))
{
if
([
'deliveryRangeTime'
].
includes
(
field
))
{
result
[
field
]
=
fields
[
field
].
map
(
v
=>
momentFormatValue
(
v
,
'HH:mm
:ss
'
))
result
[
field
]
=
fields
[
field
].
map
(
v
=>
momentFormatValue
(
v
,
'HH:mm'
))
}
else
{
}
else
{
result
[
field
]
=
momentFormatValue
(
fields
[
field
]);
result
[
field
]
=
momentFormatValue
(
fields
[
field
]);
}
}
...
...
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