|
@@ -25,9 +25,10 @@ |
|
@@ -25,9 +25,10 @@ |
25
|
class="main-container"
|
25
|
class="main-container"
|
26
|
ref="scroll"
|
26
|
ref="scroll"
|
27
|
:options="scrollOpts"
|
27
|
:options="scrollOpts"
|
28
|
- :scroll-events="['scroll', 'scroll-end']"
|
28
|
+ :scroll-events="['scroll', 'scroll-end', 'before-scroll-start']"
|
29
|
@scroll="onScrollHandle"
|
29
|
@scroll="onScrollHandle"
|
30
|
- @scroll-end="onScrollEndHandle">
|
30
|
+ @scroll-end="onScrollEndHandle"
|
|
|
31
|
+ @before-scroll-start="beforeScrollStartHandle">
|
31
|
<div ref="authorProfile" class="author-profile">
|
32
|
<div ref="authorProfile" class="author-profile">
|
32
|
<span class="avatar-box">
|
33
|
<span class="avatar-box">
|
33
|
<WidgetAvatar :src="authorBaseData.headIco" :width="100" :height="100"></WidgetAvatar>
|
34
|
<WidgetAvatar :src="authorBaseData.headIco" :width="100" :height="100"></WidgetAvatar>
|
|
@@ -50,7 +51,7 @@ |
|
@@ -50,7 +51,7 @@ |
50
|
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
|
51
|
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
|
51
|
</div>
|
52
|
</div>
|
52
|
<div ref="contantList" class="contant-list" :style="`min-height: ${listMinHeight}px;`">
|
53
|
<div ref="contantList" class="contant-list" :style="`min-height: ${listMinHeight}px;`">
|
53
|
- <p v-if="emptyTip" class="empty-tip" :height="emptyTipHeight">{{emptyTip}}</p>
|
54
|
+ <p v-if="emptyTip" class="empty-tip">{{emptyTip}}</p>
|
54
|
<WaterFall class="pannel-wrap" :list="list" :params="params"></WaterFall>
|
55
|
<WaterFall class="pannel-wrap" :list="list" :params="params"></WaterFall>
|
55
|
<div v-if="loadStatus && !emptyTip" class="loading">
|
56
|
<div v-if="loadStatus && !emptyTip" class="loading">
|
56
|
<Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading>
|
57
|
<Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading>
|
|
@@ -59,7 +60,7 @@ |
|
@@ -59,7 +60,7 @@ |
59
|
</div>
|
60
|
</div>
|
60
|
</cube-scroll>
|
61
|
</cube-scroll>
|
61
|
|
62
|
|
62
|
- <a v-if="isOwner" class="publish hover-opacity" :href="publishUrl"></a>
|
63
|
+ <a v-if="isOwner" class="publish hover-opacity" :class="{'scroll-opacity': scrolling}" :href="publishUrl"></a>
|
63
|
</Layout>
|
64
|
</Layout>
|
64
|
</template>
|
65
|
</template>
|
65
|
|
66
|
|
|
@@ -78,6 +79,7 @@ |
|
@@ -78,6 +79,7 @@ |
78
|
data() {
|
79
|
data() {
|
79
|
return {
|
80
|
return {
|
80
|
scrollY: 0,
|
81
|
scrollY: 0,
|
|
|
82
|
+ scrolling: false,
|
81
|
mineInfoUrl: '//m.yohobuy.com/home/mydetails?openby:yohobuy={"action":"go.mineinfo"}',
|
83
|
mineInfoUrl: '//m.yohobuy.com/home/mydetails?openby:yohobuy={"action":"go.mineinfo"}',
|
82
|
publishUrl: '?openby:yohobuy={"action":"go.grasspublish"}',
|
84
|
publishUrl: '?openby:yohobuy={"action":"go.grasspublish"}',
|
83
|
autherInfo: {},
|
85
|
autherInfo: {},
|
|
@@ -92,7 +94,6 @@ |
|
@@ -92,7 +94,6 @@ |
92
|
listMinHeight: 0,
|
94
|
listMinHeight: 0,
|
93
|
fetchInfo: {},
|
95
|
fetchInfo: {},
|
94
|
loadStatus: '',
|
96
|
loadStatus: '',
|
95
|
- emptyTipHeight: '',
|
|
|
96
|
emptyTip: '',
|
97
|
emptyTip: '',
|
97
|
scrollOpts: {
|
98
|
scrollOpts: {
|
98
|
bounce: false
|
99
|
bounce: false
|
|
@@ -109,7 +110,6 @@ |
|
@@ -109,7 +110,6 @@ |
109
|
this.init(this.$route.params);
|
110
|
this.init(this.$route.params);
|
110
|
|
111
|
|
111
|
this.listMinHeight = this.$el.offsetHeight - this.$refs.tabBlock.offsetHeight - $dom.offsetHeight;
|
112
|
this.listMinHeight = this.$el.offsetHeight - this.$refs.tabBlock.offsetHeight - $dom.offsetHeight;
|
112
|
- this.emptyTipHeight = this.$el.offsetHeight - this.$refs.contantList.offsetTop - $dom.offsetHeight - 40;
|
|
|
113
|
|
113
|
|
114
|
if ($dom.offsetHeight) {
|
114
|
if ($dom.offsetHeight) {
|
115
|
this._animeDuration = 300;
|
115
|
this._animeDuration = 300;
|
|
@@ -238,6 +238,7 @@ |
|
@@ -238,6 +238,7 @@ |
238
|
this._animePlayed = animePlayed;
|
238
|
this._animePlayed = animePlayed;
|
239
|
},
|
239
|
},
|
240
|
onScrollEndHandle(scroll) {
|
240
|
onScrollEndHandle(scroll) {
|
|
|
241
|
+ this.scrolling = false;
|
241
|
if (1000 - scroll.y > this.$refs.contantList.offsetHeight) {
|
242
|
if (1000 - scroll.y > this.$refs.contantList.offsetHeight) {
|
242
|
this._listTimer && clearTimeout(this._listTimer);
|
243
|
this._listTimer && clearTimeout(this._listTimer);
|
243
|
this._listTimer = setTimeout(() => {
|
244
|
this._listTimer = setTimeout(() => {
|
|
@@ -245,6 +246,9 @@ |
|
@@ -245,6 +246,9 @@ |
245
|
}, 50);
|
246
|
}, 50);
|
246
|
}
|
247
|
}
|
247
|
},
|
248
|
},
|
|
|
249
|
+ beforeScrollStartHandle() {
|
|
|
250
|
+ this.scrolling = true;
|
|
|
251
|
+ },
|
248
|
changeTab(index) {
|
252
|
changeTab(index) {
|
249
|
if (this.activeIndex !== index) {
|
253
|
if (this.activeIndex !== index) {
|
250
|
this.activeIndex = index;
|
254
|
this.activeIndex = index;
|
|
@@ -550,13 +554,20 @@ |
|
@@ -550,13 +554,20 @@ |
550
|
white-space: nowrap;
|
554
|
white-space: nowrap;
|
551
|
}
|
555
|
}
|
552
|
|
556
|
|
|
|
557
|
+ .contant-list {
|
|
|
558
|
+ position: relative;
|
|
|
559
|
+ }
|
|
|
560
|
+
|
553
|
.empty-tip {
|
561
|
.empty-tip {
|
|
|
562
|
+ width: 100%;
|
554
|
display: flex;
|
563
|
display: flex;
|
555
|
justify-content: center;
|
564
|
justify-content: center;
|
556
|
align-items: center;
|
565
|
align-items: center;
|
557
|
- height: 1000px;
|
|
|
558
|
font-size: 28px;
|
566
|
font-size: 28px;
|
559
|
color: #ddd;
|
567
|
color: #ddd;
|
|
|
568
|
+ position: absolute;
|
|
|
569
|
+ top: 0;
|
|
|
570
|
+ bottom: 240px;
|
560
|
}
|
571
|
}
|
561
|
|
572
|
|
562
|
.loading {
|
573
|
.loading {
|
|
@@ -580,5 +591,10 @@ |
|
@@ -580,5 +591,10 @@ |
580
|
background-image: url('../../statics/image/userpage/publish.png');
|
591
|
background-image: url('../../statics/image/userpage/publish.png');
|
581
|
background-size: 100% 100%;
|
592
|
background-size: 100% 100%;
|
582
|
z-index: 10;
|
593
|
z-index: 10;
|
|
|
594
|
+ transition: all 600ms ease-in-out;
|
|
|
595
|
+
|
|
|
596
|
+ &.scroll-opacity {
|
|
|
597
|
+ opacity: 0.3;
|
|
|
598
|
+ }
|
583
|
}
|
599
|
}
|
584
|
</style> |
600
|
</style> |