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
224e5667
Commit
224e5667
authored
Oct 24, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
active date selection
parent
60447384
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
src/routes/Dashboard/Analysis.js
src/routes/Dashboard/Analysis.js
+23
-4
src/routes/Dashboard/Analysis.less
src/routes/Dashboard/Analysis.less
+3
-0
No files found.
src/routes/Dashboard/Analysis.js
View file @
224e5667
...
...
@@ -75,6 +75,17 @@ export default class Analysis extends Component {
});
}
isActive
(
type
)
{
const
{
rangePickerValue
}
=
this
.
state
;
const
value
=
getTimeDistance
(
type
);
if
(
!
rangePickerValue
[
0
]
||
!
rangePickerValue
[
1
])
{
return
;
}
if
(
rangePickerValue
[
0
].
isSame
(
value
[
0
],
'
day
'
)
&&
rangePickerValue
[
1
].
isSame
(
value
[
1
],
'
day
'
))
{
return
styles
.
currentDate
;
}
}
render
()
{
const
{
rangePickerValue
,
salesType
,
currentTabKey
}
=
this
.
state
;
const
{
chart
}
=
this
.
props
;
...
...
@@ -104,10 +115,18 @@ export default class Analysis extends Component {
const
salesExtra
=
(
<
div
className
=
{
styles
.
salesExtraWrap
}
>
<
div
className
=
{
styles
.
salesExtra
}
>
<
a
onClick
=
{()
=>
this
.
selectDate
(
'
today
'
)}
>
δ»ζ₯
<
/a
>
<
a
onClick
=
{()
=>
this
.
selectDate
(
'
week
'
)}
>
ζ¬ε¨
<
/a
>
<
a
onClick
=
{()
=>
this
.
selectDate
(
'
month
'
)}
>
ζ¬ζ
<
/a
>
<
a
onClick
=
{()
=>
this
.
selectDate
(
'
year
'
)}
>
ε ¨εΉ΄
<
/a
>
<
a
className
=
{
this
.
isActive
(
'
today
'
)}
onClick
=
{()
=>
this
.
selectDate
(
'
today
'
)}
>
δ»ζ₯
<
/a
>
<
a
className
=
{
this
.
isActive
(
'
week
'
)}
onClick
=
{()
=>
this
.
selectDate
(
'
week
'
)}
>
ζ¬ε¨
<
/a
>
<
a
className
=
{
this
.
isActive
(
'
month
'
)}
onClick
=
{()
=>
this
.
selectDate
(
'
month
'
)}
>
ζ¬ζ
<
/a
>
<
a
className
=
{
this
.
isActive
(
'
year
'
)}
onClick
=
{()
=>
this
.
selectDate
(
'
year
'
)}
>
ε ¨εΉ΄
<
/a
>
<
/div
>
<
RangePicker
value
=
{
rangePickerValue
}
...
...
src/routes/Dashboard/Analysis.less
View file @
224e5667
...
...
@@ -55,6 +55,9 @@
&:hover {
color: @primary-color;
}
&.currentDate {
color: @primary-color;
}
}
}
...
...
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