|
@@ -40,8 +40,7 @@
|
|
|
<div
|
|
|
class="chart-public-list"
|
|
|
style="margin-bottom: 20px;padding-right: 20px;"
|
|
|
- :infinite-scroll-disabled="!haveMove"
|
|
|
- v-infinite-scroll="loadMove"
|
|
|
+ @scroll="loadMove"
|
|
|
ref="scrollCont"
|
|
|
>
|
|
|
<el-col
|
|
@@ -170,10 +169,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- loadMove() {
|
|
|
- this.page_no++;
|
|
|
- this.getPublicChartList();
|
|
|
- },
|
|
|
+ loadMove:_.throttle(function(e){
|
|
|
+ let scrollTop = this.$refs.scrollCont.scrollTop;
|
|
|
+ let clientHeight = this.$refs.scrollCont.clientHeight;
|
|
|
+ let scrollHeight = this.$refs.scrollCont.scrollHeight;
|
|
|
+
|
|
|
+ if (scrollTop + clientHeight >= scrollHeight - 10&&this.haveMove) {
|
|
|
+ this.page_no++;
|
|
|
+ this.getPublicChartList();
|
|
|
+ }
|
|
|
+ },300),
|
|
|
|
|
|
searchHandle() {
|
|
|
this.page_no = 1;
|