Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
6 years ago
Commit
cacde07c05a72a22ad65db837191ded830e1b049
1 parent
0fbcff06
author scroll status
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
apps/pages/userpage/author.vue
apps/pages/userpage/author.vue
View file @
cacde07
...
...
@@ -25,9 +25,10 @@
class="main-container"
ref="scroll"
:options="scrollOpts"
:scroll-events="['scroll', 'scroll-end']"
:scroll-events="['scroll', 'scroll-end'
, 'before-scroll-start'
]"
@scroll="onScrollHandle"
@scroll-end="onScrollEndHandle">
@scroll-end="onScrollEndHandle"
@before-scroll-start="beforeScrollStartHandle">
<div ref="authorProfile" class="author-profile">
<span class="avatar-box">
<WidgetAvatar :src="authorBaseData.headIco" :width="100" :height="100"></WidgetAvatar>
...
...
@@ -59,7 +60,7 @@
</div>
</cube-scroll>
<a v-if="isOwner" class="publish hover-opacity" :href="publishUrl"></a>
<a v-if="isOwner" class="publish hover-opacity" :
class="{'scroll-opacity': scrolling}" :
href="publishUrl"></a>
</Layout>
</template>
...
...
@@ -78,6 +79,7 @@
data() {
return {
scrollY: 0,
scrolling: false,
mineInfoUrl: '//m.yohobuy.com/home/mydetails?openby:yohobuy={"action":"go.mineinfo"}',
publishUrl: '?openby:yohobuy={"action":"go.grasspublish"}',
autherInfo: {},
...
...
@@ -238,6 +240,7 @@
this._animePlayed = animePlayed;
},
onScrollEndHandle(scroll) {
this.scrolling = false;
if (1000 - scroll.y > this.$refs.contantList.offsetHeight) {
this._listTimer && clearTimeout(this._listTimer);
this._listTimer = setTimeout(() => {
...
...
@@ -245,6 +248,9 @@
}, 50);
}
},
beforeScrollStartHandle() {
this.scrolling = true;
},
changeTab(index) {
if (this.activeIndex !== index) {
this.activeIndex = index;
...
...
@@ -580,5 +586,10 @@
background-image: url('../../statics/image/userpage/publish.png');
background-size: 100% 100%;
z-index: 10;
transition: all 600ms ease-in-out;
&.scroll-opacity {
opacity: 0.3;
}
}
</style>
...
...
Please
register
or
login
to post a comment