Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bjz1014
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
bjz1014
Commits
41aa6cb8
Commit
41aa6cb8
authored
Oct 15, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
ccb0bfbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
rank.jsx
src/components/rank/rank.jsx
+26
-2
No files found.
src/components/rank/rank.jsx
View file @
41aa6cb8
...
@@ -12,6 +12,27 @@ import './rank.less';
...
@@ -12,6 +12,27 @@ import './rank.less';
class
Rank
extends
React
.
Component
{
class
Rank
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
tab
:
0
}
}
updateTabData
()
{
const
{
tab
}
=
this
.
state
;
console
.
warn
(
'获取'
+
(
tab
==
1
?
'当期'
:
'下期'
)
+
'数据'
)
}
onClick_tab
=
()
=>
{
this
.
updateTabData
();
const
{
tab
}
=
this
.
state
;
this
.
setState
({
tab
:
1
-
tab
})
}
componentDidMount
()
{
this
.
updateTabData
();
}
}
onClick_close
=
()
=>
{
onClick_close
=
()
=>
{
...
@@ -24,11 +45,14 @@ class Rank extends React.Component {
...
@@ -24,11 +45,14 @@ class Rank extends React.Component {
}
}
render
()
{
render
()
{
const
{
tab
}
=
this
.
state
;
return
(
return
(
<
div
className=
"rank"
>
<
div
className=
"rank"
>
<
span
className=
"rank_bg"
></
span
>
<
span
className=
"rank_bg"
></
span
>
<
span
className=
"rank_tab1"
></
span
>
{
<
span
className=
"rank_tab2"
></
span
>
tab
==
0
?
(<
span
onClick=
{
this
.
onClick_tab
}
className=
"rank_tab1"
></
span
>)
:
(<
span
onClick=
{
this
.
onClick_tab
}
className=
"rank_tab2"
></
span
>)
}
<
span
className=
"rank_tips_rank"
>
排名
</
span
>
<
span
className=
"rank_tips_rank"
>
排名
</
span
>
<
span
className=
"rank_rank"
>
99
</
span
>
<
span
className=
"rank_rank"
>
99
</
span
>
<
span
className=
"rank_tips_history"
>
历史最高分
</
span
>
<
span
className=
"rank_tips_history"
>
历史最高分
</
span
>
...
...
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