Authored by yyq

fix

... ... @@ -2,7 +2,7 @@
<div id="app">
<transition
:name="`route-view-${yoho.direction}`">
<keep-alive>
<keep-alive :max="10">
<router-view v-if="$route.meta.keepAlive" :key="$route.fullPath"></router-view>
</keep-alive>
</transition>
... ...
... ... @@ -4,7 +4,7 @@
<div ref="eternal" class="eternal-top">
<slot name="eternalTop"></slot>
</div>
<div class="scroll-reveal-list">
<div ref="scrollList" class="scroll-reveal-list" :style="{height: listHeight + 'px'}">
<div
v-for="(items, col) in visibleItems"
:key="col"
... ... @@ -42,6 +42,7 @@ export default {
data() {
let data = {
colPrefix: 'sr_col',
listHeight: 0,
visibleItems: [],
colsHeight: [],
items: [],
... ... @@ -105,6 +106,8 @@ export default {
this.revealCalcing = true;
this.loadItems(list, oldList.length).then(() => {
this.revealCalcing = false;
this.updateListHeight();
if (oldList.length < 2) {
this._updateList();
}
... ... @@ -245,13 +248,10 @@ export default {
}
this[this.colPrefix + index].push(item);
setTimeout(() => {
this.$nextTick(() => {
r();
this.colsHeight[index] = this.$refs['col' + index][0].offsetHeight;
});
}, 100);
this.$nextTick(() => {
r();
this.colsHeight[index] = this.$refs['col' + index][0].offsetHeight;
});
});
},
getMinHeightCol() {
... ... @@ -303,6 +303,11 @@ export default {
}
this.startIndexs[index] = startIndex;
},
updateListHeight() {
if (this.$refs.scrollList) {
this.listHeight = this.$refs.scrollList.scrollHeight || 0;
}
},
_updateList() {
const scrollTop = this.$el.scrollTop;
const heights = this.$refs.scroll.offsetHeight;
... ... @@ -344,6 +349,8 @@ export default {
.scroll-reveal-list {
display: flex;
align-items: flex-start;
overflow-y: hidden;
box-sizing: border-box;
.scroll-reveal-col {
flex-grow: 1;
... ...
... ... @@ -203,8 +203,12 @@ export default {
<style lang="scss" scoped>
/deep/ .scroll-reveal-list {
padding: 6px;
padding: 0 6px;
background-color: #f0f0f0;
.scroll-reveal-col {
margin: 6px 0;
}
}
/deep/ .loading {
display: none;
... ...
... ... @@ -18,7 +18,7 @@
<ProductGroup :article-id="data.articleId" :pos-id="0" :index="0" :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup>
<ArticleDetailIntro :data="introData"></ArticleDetailIntro>
<div class="topics-wrap">
<div v-if="data.articleId" class="topics-wrap">
<ArticleItemTopics :data="topicsData" :share="share"></ArticleItemTopics>
<div class="more-wrap">
<i class="iconfont icon-more1" @click="onMore"></i>
... ...