浏览代码

Don't show “load more” if there is nothing more (followers)

marcin mikołajczak 6 年之前
父节点
当前提交
50e7d61f6e
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      resources/assets/js/components/Profile.vue

+ 5 - 3
resources/assets/js/components/Profile.vue

@@ -702,7 +702,8 @@ export default {
 				if(res.data.length > 0) {
 					this.following.push(...res.data);
 					this.followingCursor++;
-				} else {
+				}
+                if(res.data.length < 10) {
 					this.followingMore = false;
 				}
 			});
@@ -719,11 +720,12 @@ export default {
 				if(res.data.length > 0) {
 					this.followers.push(...res.data);
 					this.followerCursor++;
-				} else {
+				}
+                if(res.data.length < 10) {
 					this.followerMore = false;
 				}
 			});
 		}
 	}
 }
-</script>
+</script>