Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
6d0a622f
Commit
6d0a622f
authored
Aug 29, 2018
by
ζι
Committed by
εε³
Aug 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix reveiw issue add consistent-return rule
parent
cd1754ec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
28 deletions
+8
-28
.eslintrc.js
.eslintrc.js
+0
-1
mock/api.js
mock/api.js
+3
-16
mock/rule.js
mock/rule.js
+2
-10
src/pages/Dashboard/Analysis.js
src/pages/Dashboard/Analysis.js
+2
-1
src/utils/utils.js
src/utils/utils.js
+1
-0
No files found.
.eslintrc.js
View file @
6d0a622f
...
...
@@ -22,7 +22,6 @@ module.exports = {
'
jsx-a11y/click-events-have-key-events
'
:
0
,
'
jsx-a11y/no-static-element-interactions
'
:
0
,
'
jsx-a11y/anchor-is-valid
'
:
0
,
'
consistent-return
'
:
0
,
},
settings
:
{
polyfills
:
[
'
fetch
'
,
'
promises
'
],
...
...
mock/api.js
View file @
6d0a622f
...
...
@@ -118,12 +118,7 @@ function getFakeList(req, res) {
const
result
=
fakeList
(
count
);
sourceData
=
result
;
if
(
res
&&
res
.
json
)
{
res
.
json
(
result
);
}
else
{
return
result
;
}
res
.
json
(
result
);
}
function
postFakeList
(
req
,
res
)
{
...
...
@@ -155,11 +150,7 @@ function postFakeList(req, res) {
break
;
}
if
(
res
&&
res
.
json
)
{
res
.
json
(
result
);
}
else
{
return
result
;
}
res
.
json
(
result
);
}
const
getNotice
=
[
...
...
@@ -327,11 +318,7 @@ const getActivities = [
];
function
getFakeCaptcha
(
req
,
res
)
{
if
(
res
&&
res
.
json
)
{
res
.
json
(
'
captcha-xxx
'
);
}
else
{
return
'
captcha-xxx
'
;
}
res
.
json
(
'
captcha-xxx
'
);
}
export
default
{
...
...
mock/rule.js
View file @
6d0a622f
...
...
@@ -72,11 +72,7 @@ function getRule(req, res, u) {
},
};
if
(
res
&&
res
.
json
)
{
res
.
json
(
result
);
}
else
{
return
result
;
}
res
.
json
(
result
);
}
function
postRule
(
req
,
res
,
u
,
b
)
{
...
...
@@ -133,11 +129,7 @@ function postRule(req, res, u, b) {
},
};
if
(
res
&&
res
.
json
)
{
res
.
json
(
result
);
}
else
{
return
result
;
}
res
.
json
(
result
);
}
export
default
{
...
...
src/pages/Dashboard/Analysis.js
View file @
6d0a622f
...
...
@@ -132,7 +132,7 @@ class Analysis extends Component {
const
{
rangePickerValue
}
=
this
.
state
;
const
value
=
getTimeDistance
(
type
);
if
(
!
rangePickerValue
[
0
]
||
!
rangePickerValue
[
1
])
{
return
;
return
undefined
;
}
if
(
rangePickerValue
[
0
].
isSame
(
value
[
0
],
'
day
'
)
&&
...
...
@@ -140,6 +140,7 @@ class Analysis extends Component {
)
{
return
styles
.
currentDate
;
}
return
undefined
;
}
render
()
{
...
...
src/utils/utils.js
View file @
6d0a622f
...
...
@@ -52,6 +52,7 @@ export function getTimeDistance(type) {
return
[
moment
(
`
${
year
}
-01-01 00:00:00`
),
moment
(
`
${
year
}
-12-31 23:59:59`
)];
}
return
undefined
;
}
export
function
getPlainNode
(
nodeList
,
parentPath
=
''
)
{
...
...
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