Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ptfw-uniapp
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
侯忠英
ptfw-uniapp
Commits
98f5fbb5
Commit
98f5fbb5
authored
Jul 23, 2019
by
DPFly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化滚动渐变虚拟导航栏,修复完全显示时滚动抖动问题
parent
fb9f63a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
index.vue
src/pages/index/index.vue
+5
-8
index.vue
src/pages/store/index/index.vue
+4
-7
No files found.
src/pages/index/index.vue
View file @
98f5fbb5
...
...
@@ -71,15 +71,12 @@
})
},
onPageScroll
(
e
)
{
if
(
this
.
canUse
[
'navigationStyle'
]){
if
(
this
.
canUse
[
'navigationStyle'
])
{
let
scrollTop
=
e
.
scrollTop
>
0
?
e
.
scrollTop
-
this
.
statusBarHeight
:
0
let
isShowTitle
=
1
-
scrollTop
*
0.01
if
(
isShowTitle
<
0
)
{
isShowTitle
=
0
}
if
(
isShowTitle
>
1
)
{
isShowTitle
=
1
}
let
isShowTitle
=
Number
((
1
-
scrollTop
*
0.01
).
toFixed
(
2
))
isShowTitle
=
isShowTitle
<
0
?
0
:
isShowTitle
>
1
?
1
:
isShowTitle
if
(
this
.
isShowTitle
===
isShowTitle
)
return
this
.
isShowTitle
=
isShowTitle
}
},
...
...
src/pages/store/index/index.vue
View file @
98f5fbb5
...
...
@@ -782,13 +782,10 @@
onPageScroll
(
e
)
{
if
(
this
.
canUse
[
'navigationStyle'
])
{
let
scrollTop
=
e
.
scrollTop
>
0
?
e
.
scrollTop
-
this
.
statusBarHeight
:
0
let
isShowTitle
=
1
-
scrollTop
*
0.01
if
(
isShowTitle
<
0
)
{
isShowTitle
=
0
}
if
(
isShowTitle
>
1
)
{
isShowTitle
=
1
}
let
isShowTitle
=
Number
((
1
-
scrollTop
*
0.01
).
toFixed
(
2
))
isShowTitle
=
isShowTitle
<
0
?
0
:
isShowTitle
>
1
?
1
:
isShowTitle
if
(
this
.
isShowTitle
===
isShowTitle
)
return
this
.
isShowTitle
=
isShowTitle
}
},
...
...
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