Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
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
zhouqian
vue-gjjs
Commits
b8080b2b
Commit
b8080b2b
authored
Jul 15, 2020
by
傅凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复处理函数日期判断不对缺陷
parent
2f40df9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
index.js
src/utils/index.js
+4
-2
vuefunc.js
src/utils/vuefunc.js
+5
-0
No files found.
src/utils/index.js
View file @
b8080b2b
...
...
@@ -30,7 +30,9 @@ export default class Utils{
if
(
!
obj
[
key
])
target
[
nkey
]
=
obj
[
key
];
else
if
(
obj
[
key
]
instanceof
Array
)
target
[
nkey
]
=
obj
[
key
];
target
[
nkey
]
=
obj
[
key
];
else
if
(
obj
[
key
]
instanceof
Date
)
target
[
nkey
]
=
obj
[
key
];
else
if
(
typeof
obj
[
key
]
==
"object"
)
Utils
.
flatObject
(
obj
[
key
],
target
,
nkey
);
//递归赋值
else
...
...
@@ -60,7 +62,7 @@ export default class Utils{
{
let
leafProp
=
keyArr
[
keyArr
.
length
-
1
];
if
(
tempobj
.
hasOwnProperty
(
leafProp
))
tempobj
[
leafProp
]
=
obj
[
key
];
tempobj
[
leafProp
]
=
vo
[
key
];
}
}
return
target
;
...
...
src/utils/vuefunc.js
View file @
b8080b2b
...
...
@@ -10,6 +10,11 @@ export function findCodeLabel(codes,val)
}
export
function
dateFormat
(
date
,
format
)
{
if
(
!
date
)
return
date
if
(
typeof
date
==
'string'
)
date
=
new
Date
(
date
)
let
_format
=
format
||
'yyyy-MM-dd'
;
const
d
=
date
;
...
...
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