Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
9c63afc4
Commit
9c63afc4
authored
May 17, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页点击头部滚动到顶部
parent
74762c68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
index.vue
src/components/tabBarList/index.vue
+9
-5
index.vue
src/pages/index/index.vue
+17
-4
No files found.
src/components/tabBarList/index.vue
View file @
9c63afc4
<
template
>
<view
:class=
"['content',
{'fixed': fixed}]">
<u-navbar
:is-back=
"false"
:is-fixed=
"false"
:background=
"
{ background: 'transparent' }" :border-bottom="false">
<text
class=
"title-view"
>
{{
title
}}
</text>
</u-navbar>
<view
:class=
"['content',
{'fixed': fixed}]">
<view
@
click=
"handleClick"
>
<u-navbar
:is-back=
"false"
:is-fixed=
"false"
:background=
"
{ background: 'transparent' }" :border-bottom="false">
<text
class=
"title-view"
>
{{
title
}}
</text>
</u-navbar>
</view>
<slot></slot>
</view>
</
template
>
...
...
@@ -25,7 +27,9 @@
}
},
methods
:
{
handleClick
()
{
this
.
$emit
(
'click'
)
}
}
}
</
script
>
...
...
src/pages/index/index.vue
View file @
9c63afc4
<
template
>
<TabBarPage
title=
"扳手会"
:fixed=
"true"
>
<TabBarPage
title=
"扳手会"
:fixed=
"true"
@
click=
"goTop"
>
<view
class=
"content-view"
>
<scroll-view
style=
"height: 100%;"
scroll-y
@
scrolltolower=
"reachBottom"
<scroll-view
style=
"height: 100%;"
scroll-y
@
scrolltolower=
"reachBottom"
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
scroll-anchoring
scroll-y=
"true"
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
@
refresherabort=
"onAbort"
enable-back-to-top
>
<!--
<TabBarPage
title=
"扳手会"
>
-->
<image
class=
"banner-image"
:src=
"bannerImage"
@
click=
"handleClickBanner"
></image>
...
...
@@ -116,7 +116,11 @@
waitInit
:
false
,
// 当token为空时,等待自动登录结束
triggered
:
false
,
_freshing
:
false
,
visible
:
false
,
visible
:
false
,
scrollTop
:
0
,
old
:
{
scrollTop
:
0
}
};
},
watch
:
{
...
...
@@ -275,6 +279,15 @@
onRestore
()
{
this
.
triggered
=
'restore'
;
// 需要重置
},
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
},
goTop
(
e
)
{
this
.
scrollTop
=
this
.
old
.
scrollTop
this
.
$nextTick
(
function
()
{
this
.
scrollTop
=
0
});
},
/* 立即入驻 */
immediatelyIn
()
{
if
(
this
.
vuex_token
)
{
...
...
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