Showing
1 changed file
with
6 additions
and
1 deletions
| @@ -15,6 +15,7 @@ export struct PlayerCommentComponent { | @@ -15,6 +15,7 @@ export struct PlayerCommentComponent { | ||
| 15 | @Consume displayDirection: DisplayDirection | 15 | @Consume displayDirection: DisplayDirection |
| 16 | @State private pageModel: PageModel = new PageModel() | 16 | @State private pageModel: PageModel = new PageModel() |
| 17 | @State liveChatList: Array<LiveRoomItemBean> = [] | 17 | @State liveChatList: Array<LiveRoomItemBean> = [] |
| 18 | + scroller: Scroller = new Scroller() | ||
| 18 | 19 | ||
| 19 | aboutToAppear(): void { | 20 | aboutToAppear(): void { |
| 20 | this.getLiveChatList() | 21 | this.getLiveChatList() |
| @@ -44,6 +45,10 @@ export struct PlayerCommentComponent { | @@ -44,6 +45,10 @@ export struct PlayerCommentComponent { | ||
| 44 | } else { | 45 | } else { |
| 45 | this.pageModel.hasMore = false; | 46 | this.pageModel.hasMore = false; |
| 46 | } | 47 | } |
| 48 | + | ||
| 49 | + setTimeout(() => { | ||
| 50 | + this.scroller.scrollEdge(Edge.Bottom) | ||
| 51 | + }, 500) | ||
| 47 | } else { | 52 | } else { |
| 48 | this.pageModel.viewType = ViewType.EMPTY; | 53 | this.pageModel.viewType = ViewType.EMPTY; |
| 49 | } | 54 | } |
| @@ -55,7 +60,7 @@ export struct PlayerCommentComponent { | @@ -55,7 +60,7 @@ export struct PlayerCommentComponent { | ||
| 55 | 60 | ||
| 56 | build() { | 61 | build() { |
| 57 | Column() { | 62 | Column() { |
| 58 | - List() { | 63 | + List({ scroller: this.scroller }) { |
| 59 | // 主持人 | 64 | // 主持人 |
| 60 | if (this.liveDetailsBean.oldNewsId) { | 65 | if (this.liveDetailsBean.oldNewsId) { |
| 61 | ChartItemCompereComponent() | 66 | ChartItemCompereComponent() |
-
Please register or login to post a comment