Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
27b16f83
Commit
27b16f83
authored
Oct 09, 2023
by
zeyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化滚动逻辑
parent
3de4043d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/app/my/activity-detail/activity-detail.component.html
+1
-1
src/app/my/activity-detail/activity-detail.component.ts
+3
-1
No files found.
src/app/my/activity-detail/activity-detail.component.html
View file @
27b16f83
...
...
@@ -32,7 +32,7 @@
<div
id=
"tab4"
class=
"imgBox"
><img
src=
"assets/images/activity/activity04.png"
></div>
<div
id=
"tab5"
class=
"imgBox"
><img
src=
"assets/images/activity/activity05.png"
></div>
<div
id=
"tab6"
class=
"imgBox"
><img
src=
"assets/images/activity/activity06.png"
></div>
<div
class=
"imgBox"
[
ngClass
]="
shareCode
?
'
maginT
'
:
'
marginF
'"
>
<div
class=
"imgBox"
[
ngClass
]="
shareCode
?
(
state
?
'
marginF
'
:
'
maginT
')
:
'
marginF
'"
>
<img
src=
"assets/images/activity/activity07.png"
>
<div
(
click
)="
c_guanw
()"
class=
"buttonBox"
style=
"left: 8.5%;bottom:20%;padding: 2px 10px;"
>
银盾官网了解更多
...
...
src/app/my/activity-detail/activity-detail.component.ts
View file @
27b16f83
...
...
@@ -116,7 +116,7 @@ export class ActivityDetailComponent implements OnInit, OnDestroy {
}
handleScroll
()
{
//盒子高度
let
clientHeight
=
document
.
getElementById
(
"offsetHeight"
).
clientHeight
-
document
.
getElementById
(
"content"
).
clientHeight
+
(
this
.
shareCode
?
70
:
120
);
let
clientHeight
=
document
.
getElementById
(
"offsetHeight"
).
clientHeight
-
document
.
getElementById
(
"content"
).
clientHeight
+
(
this
.
shareCode
?
(
this
.
state
?
120
:
70
)
:
120
);
//滑动是否是横向
if
(
this
.
scrollTop
==
document
.
getElementById
(
"content"
).
scrollTop
){
...
...
@@ -143,6 +143,8 @@ export class ActivityDetailComponent implements OnInit, OnDestroy {
});
}
console
.
log
(
clientHeight
);
console
.
log
(
this
.
scrollTop
);
//滚动到底判断
if
(
clientHeight
==
this
.
scrollTop
){
document
.
getElementById
(
"content"
).
scrollTo
({
...
...
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