Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue-ssr
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
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
lixy
vue-ssr
Commits
36758352
Commit
36758352
authored
Sep 04, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关于欣新
parent
8592591c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
aboutXx.vue
pages/aboutXx.vue
+23
-20
No files found.
pages/aboutXx.vue
View file @
36758352
...
...
@@ -157,27 +157,30 @@
methods
:
{
handleScroll
:
function
()
{
let
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
var
menuTop
=
document
.
querySelector
(
'#historyNav'
).
offsetTop
;
//滑动到指定位置菜单吸顶
if
(
scrollTop
>
menuTop
-
120
)
{
this
.
barFixed
=
true
;
}
let
top1
=
document
.
querySelector
(
'#history01'
).
offsetTop
;
let
top2
=
document
.
querySelector
(
'#history02'
).
offsetTop
;
let
top3
=
document
.
querySelector
(
'#history03'
).
offsetTop
;
let
top4
=
document
.
querySelector
(
'#history04'
).
offsetTop
;
let
path
=
$nuxt
.
$route
.
path
;
if
(
path
==
'/aboutXx'
){
var
menuTop
=
document
.
querySelector
(
'#historyNav'
).
offsetTop
;
//滑动到指定位置菜单吸顶
if
(
scrollTop
>
menuTop
-
120
)
{
this
.
barFixed
=
true
;
}
let
top1
=
document
.
querySelector
(
'#history01'
).
offsetTop
;
let
top2
=
document
.
querySelector
(
'#history02'
).
offsetTop
;
let
top3
=
document
.
querySelector
(
'#history03'
).
offsetTop
;
let
top4
=
document
.
querySelector
(
'#history04'
).
offsetTop
;
if
(
scrollTop
<
201
){
this
.
barFixed
=
false
;
this
.
tabIndex
=
0
;
}
else
if
(
scrollTop
>=
201
&&
scrollTop
<
top2
-
301
){
this
.
tabIndex
=
0
;
}
else
if
(
scrollTop
>=
top2
-
301
&&
scrollTop
<
top3
-
301
){
this
.
tabIndex
=
1
;
}
else
if
(
scrollTop
>=
top3
-
301
&&
scrollTop
<
top4
-
301
){
this
.
tabIndex
=
2
;
}
else
if
(
scrollTop
>=
top4
-
301
){
this
.
tabIndex
=
3
;
if
(
scrollTop
<
201
){
this
.
barFixed
=
false
;
this
.
tabIndex
=
0
;
}
else
if
(
scrollTop
>=
201
&&
scrollTop
<
top2
-
301
){
this
.
tabIndex
=
0
;
}
else
if
(
scrollTop
>=
top2
-
301
&&
scrollTop
<
top3
-
301
){
this
.
tabIndex
=
1
;
}
else
if
(
scrollTop
>=
top3
-
301
&&
scrollTop
<
top4
-
301
){
this
.
tabIndex
=
2
;
}
else
if
(
scrollTop
>=
top4
-
301
){
this
.
tabIndex
=
3
;
}
}
},
/**
...
...
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