From 620f759cfe9fa42fa9667b2ec63d7d00944e4af0 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Wed, 02 Mar 2022 12:49:35 +0800 Subject: [PATCH] 评论列表样式调整 --- src/components/group/articleListScorll.vue | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/group/articleListScorll.vue b/src/components/group/articleListScorll.vue index 99f4a78..716efc8 100644 --- a/src/components/group/articleListScorll.vue +++ b/src/components/group/articleListScorll.vue @@ -1,18 +1,24 @@ <template> <div> <div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" :infinite-scroll-distance="10"> - <div v-for="(temp,index) in data"> + <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> </div> <a-row type="flex" justify="center"> - <div style="position:fixed;bottom: 10px;" id="dddadf"> + <div style="position:fixed;bottom: 10px;" > <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> @@ -61,6 +67,7 @@ directives: { infiniteScroll }, + data() { return { typeId: "", @@ -69,8 +76,9 @@ busy: false, size: "small", total: 1, - pageSize: 1, + pageSize: 6, current: 1, + defaultPageSize:10 }; }, watch: { @@ -81,10 +89,9 @@ }, typeId: function(newValue, oldValue) { this.busy = true; - this.$message.info('loading',0.3); + this.$message.info('loading', 0.3); this.onChange(1); - } - + }, }, activated() { window.addEventListener('scroll', this); @@ -95,6 +102,7 @@ beforeMount() { queryBlogArticleList({ pageNo: this.current, + pageSize:this.pageSize, typeId: this.typeId }).then((res) => { this.total = Number(res.data.total) @@ -108,6 +116,7 @@ this.current = current; queryBlogArticleList({ pageNo: current, + pageSize:this.pageSize, typeId: this.typeId }).then((res) => { this.busy = false; @@ -123,6 +132,7 @@ queryBlogArticleList({ pageNo: this.current + 1, + pageSize:this.pageSize, typeId: this.typeId }).then((res) => { -- Gitblit v1.9.1