Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
live-management-web
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
live-management-web
Commits
76b156fd
Commit
76b156fd
authored
Jul 28, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新数据类型校验方法
parent
10024fae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
src/utils/tool.ts
+5
-1
No files found.
src/utils/tool.ts
View file @
76b156fd
...
...
@@ -143,10 +143,14 @@ export const isDev = () => {
};
// 判断数据类型
export
const
DataType
=
(
value
:
any
,
key
:
'array'
|
'string'
=
'array'
)
=>
{
export
const
DataType
=
(
value
:
any
,
key
:
'array'
|
'string'
|
'object'
=
'array'
)
=>
{
const
toString
=
Object
.
prototype
.
toString
;
if
(
key
==
'array'
)
{
return
toString
.
call
(
value
)
===
'[object Array]'
;
}
else
if
(
key
==
'string'
)
{
return
toString
.
call
(
value
)
===
'[object String]'
;
}
else
if
(
key
==
'object'
)
{
return
toString
.
call
(
value
)
===
'[object Object]'
;
}
};
...
...
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