| | |
| | | <template> |
| | | <div> |
| | | <div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" :infinite-scroll-distance="10"> |
| | | <div v-for="(temp,index) in data"> |
| | | <newArticle v-bind="temp" :index="index"></newArticle> |
| | | <!-- <box5 v-bind="temp"></box5> --> |
| | | </div> |
| | | <div class="mySecret" v-if="data.length==0"> |
| | | <p>空空如也..</p> |
| | | </div> |
| | | |
| | | <div v-for="(temp,index) in data" > |
| | | <newArticle v-bind="temp" :index="index"></newArticle> |
| | | <!-- <box5 v-bind="temp"></box5> --> |
| | | </div> |
| | | |
| | | |
| | | <div v-if="loading && !busy" class="demo-loading-container"> |
| | | <a-spin /> |
| | | </div> |
| | |
| | | <a-row type="flex" justify="center"> |
| | | <div style="position:fixed;bottom: 10px;" id="dddadf"> |
| | | <a-pagination @change="onChange" :showQuickJumper="true" :size="size" v-model="current" |
| | | :defaultPageSize="10" :pageSize="pageSize" :total="total" /> |
| | | :defaultPageSize="defaultPageSize" :pageSize="pageSize" :total="total" /> |
| | | </div> |
| | | </a-row> |
| | | |
| | |
| | | directives: { |
| | | infiniteScroll |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | typeId: "", |
| | |
| | | busy: false, |
| | | size: "small", |
| | | total: 1, |
| | | pageSize: 1, |
| | | pageSize: 10, |
| | | current: 1, |
| | | defaultPageSize:10 |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | this.busy = true; |
| | | this.$message.info('loading', 0.3); |
| | | this.onChange(1); |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | activated() { |
| | | window.addEventListener('scroll', this); |
| | |
| | | beforeMount() { |
| | | queryBlogArticleList({ |
| | | pageNo: this.current, |
| | | pageSize:this.pageSize, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | this.total = Number(res.data.total) |
| | |
| | | this.current = current; |
| | | queryBlogArticleList({ |
| | | pageNo: current, |
| | | pageSize:this.pageSize, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | this.busy = false; |
| | |
| | | |
| | | queryBlogArticleList({ |
| | | pageNo: this.current + 1, |
| | | pageSize:this.pageSize, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | |