Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
5c64e301
Commit
5c64e301
authored
Jul 16, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
3548c419
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
HomeLayout.vue
src/layouts/HomeLayout.vue
+41
-2
No files found.
src/layouts/HomeLayout.vue
View file @
5c64e301
...
@@ -3,7 +3,24 @@
...
@@ -3,7 +3,24 @@
padding-top
:
30px
!important
;
padding-top
:
30px
!important
;
padding-bottom
:
30px
!important
;
padding-bottom
:
30px
!important
;
}
}
.goBackTop
{
width
:
56px
;
height
:
56px
;
border-radius
:
50%
;
background-color
:
#027be3
;
position
:
fixed
;
right
:
20px
;
bottom
:
20px
;
color
:
#fff
;
text-align
:
center
;
line-height
:
56px
;
z-index
:
999
;
opacity
:
0
;
transition
:
opacity
2s
linear
;
}
.showGoback
{
opacity
:
100
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<q-layout
view=
"hHh lpr fFf"
>
<q-layout
view=
"hHh lpr fFf"
>
...
@@ -12,7 +29,9 @@
...
@@ -12,7 +29,9 @@
<q-page-container>
<q-page-container>
<router-view
/>
<router-view
/>
</q-page-container>
</q-page-container>
<div
class=
"goBackTop"
:class=
"
{'showGoback':isShowTop}" @click="hangleGoUp">
<i
class=
"iconfont iconarrow-top"
></i>
</div>
<q-footer
elevated
class=
"bg-grey-8 text-white"
style=
"position: unset;"
>
<q-footer
elevated
class=
"bg-grey-8 text-white"
style=
"position: unset;"
>
<horBtm
:dataList=
"dataList"
></horBtm>
<horBtm
:dataList=
"dataList"
></horBtm>
</q-footer>
</q-footer>
...
@@ -48,6 +67,7 @@
...
@@ -48,6 +67,7 @@
RB_Group_Id
:
0
,
RB_Group_Id
:
0
,
//当天
//当天
ToDay
:
""
,
ToDay
:
""
,
isShowTop
:
false
};
};
},
},
created
()
{
created
()
{
...
@@ -58,6 +78,7 @@
...
@@ -58,6 +78,7 @@
})
})
},
},
mounted
()
{
mounted
()
{
window
.
addEventListener
(
'scroll'
,
this
.
getScrollHeight
,
false
);
//判断是不是同一天
//判断是不是同一天
if
(
localStorage
.
ToDay
)
{
if
(
localStorage
.
ToDay
)
{
if
(
localStorage
.
ToDay
!=
this
.
ToDay
)
{
if
(
localStorage
.
ToDay
!=
this
.
ToDay
)
{
...
@@ -99,6 +120,24 @@
...
@@ -99,6 +120,24 @@
}
}
},
},
methods
:
{
methods
:
{
//点击回到顶部
hangleGoUp
(){
let
nowTop
=
document
.
body
.
scrollTop
||
document
.
documentElement
.
scrollTop
;
// 获取当前滚动条位置
if
(
nowTop
>
0
)
{
window
.
requestAnimationFrame
(
this
.
hangleGoUp
);
window
.
scrollTo
(
0
,
nowTop
-
(
nowTop
/
5
));
}
},
//监测滚动条位置
getScrollHeight
(){
let
nowTop
=
document
.
body
.
scrollTop
||
document
.
documentElement
.
scrollTop
;
// 获取当前滚动条位置
if
(
nowTop
>
200
){
this
.
isShowTop
=
true
;
}
else
{
this
.
isShowTop
=
false
;
}
},
changeHeadHandler
(
t
)
{
changeHeadHandler
(
t
)
{
this
.
headType
=
t
;
this
.
headType
=
t
;
},
},
...
...
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