Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
baiguangyao
mr-julyedu
Commits
a9864947
Commit
a9864947
authored
Sep 26, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab bug修改部分
parent
22a2b500
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
src/components/detail/outline/index.js
+13
-0
src/components/detail/outline/index.scss
+21
-0
No files found.
src/components/detail/outline/index.js
View file @
a9864947
...
@@ -44,6 +44,10 @@ class OutLine extends Component {
...
@@ -44,6 +44,10 @@ class OutLine extends Component {
})
})
}
}
change
=
(
index
)
=>
{
console
.
log
(
index
);
}
render
()
{
render
()
{
const
tabs
=
[
const
tabs
=
[
{
title
:
'介绍'
},
{
title
:
'介绍'
},
...
@@ -57,6 +61,15 @@ class OutLine extends Component {
...
@@ -57,6 +61,15 @@ class OutLine extends Component {
<
div
className
=
'course-detail'
>
<
div
className
=
'course-detail'
>
<
WhiteSpace
/>
<
WhiteSpace
/>
<
StickyContainer
>
<
StickyContainer
>
<
div
className
=
'detail_tab'
>
{
tabs
.
map
((
item
,
index
)
=>
{
return
<
div
onClick
=
{
e
=>
change
(
index
)}
className
=
"tabItem"
key
=
{
index
}
>
<
span
>
{
item
.
title
}
<
/span
>
<
/div
>
})
}
<
/div
>
<
Tabs
tabs
=
{
tabs
}
<
Tabs
tabs
=
{
tabs
}
initialPage
=
{
0
}
initialPage
=
{
0
}
swipeable
=
{
false
}
swipeable
=
{
false
}
...
...
src/components/detail/outline/index.scss
View file @
a9864947
...
@@ -185,4 +185,25 @@
...
@@ -185,4 +185,25 @@
background-color
:
$bg_FE2F2F
;
background-color
:
$bg_FE2F2F
;
}
}
}
}
.detail_tab
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
height
:
46px
;
.tabItem
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
50%
;
span
{
display
:
inline-block
;
height
:
100%
;
border-bottom
:
1px
solid
#09f
;
padding
:
6px
0
;
}
}
}
}
}
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