Authored by yyq

fix scoll

... ... @@ -101,7 +101,7 @@
if (!this.$route.params.id) {
this._apiNamePre += 'Mine';
}
console.log(this.$route.params);
this.autherInfo = {
authorUid: this.$route.params.id,
authorType: this.$route.params.type || 1
... ... @@ -208,7 +208,7 @@ console.log(this.$route.params);
info.page = info.page || 1;
if (info.page >= info.totalPage) {
if (info.page > info.totalPage) {
return;
}
... ...
... ... @@ -34,7 +34,7 @@
</template>
<script>
import {assign, get} from 'lodash';
import {assign, get, forEach} from 'lodash';
export default {
data() {
... ... @@ -77,7 +77,16 @@ export default {
},
mounted() {
this.$on('calced', (nlist) => {
this.viewList = this.viewList.concat(nlist);
nlist = [...nlist];
forEach(this.viewList, value => {
if (!value._temporary) {
nlist.push(value);
}
}),
this.viewList = nlist;
this.$nextTick(() => {
this.calcLayout();
})
... ... @@ -118,6 +127,7 @@ export default {
item.coverHeight = Math.floor(item.imageHeight / item.imageWidth * this.coverImageWidth);
nlist.push(assign({_temporary: true}, item));
this.calcIndex++;
};
this.$emit('calced', nlist);
... ... @@ -169,6 +179,7 @@ export default {
}
this.loadedIndex = this.list.length;
this.colsHeight = [...this.colsHeight];
this.resetViewList();
},
... ... @@ -339,8 +350,12 @@ export default {
}
.name {
max-width: 170px;
display: inline-block;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fav {
... ...