File tree Expand file tree Collapse file tree
src/main/resources/extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,5 +41,5 @@ build {
4141}
4242
4343halo {
44- version = " 2.14.0 "
44+ version = " 2.15.0-rc.1 "
4545}
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export class CommentReplies extends LitElement {
9292 this . page = 1 ;
9393 }
9494
95- const queryParams = [ `page=${ this . page || 0 } ` , `size=${ this . replySize } ` ] ;
95+ const queryParams = [ `page=${ this . page || 1 } ` , `size=${ this . replySize } ` ] ;
9696
9797 const response = await fetch (
9898 `${ this . baseUrl } /apis/api.halo.run/v1alpha1/comments/${ this . comment ?. metadata . name } /reply?${ queryParams . join ( '&' ) } `
@@ -122,8 +122,14 @@ export class CommentReplies extends LitElement {
122122 }
123123
124124 async fetchNext ( ) {
125- this . page ++ ;
126- await this . fetchReplies ( { append : true } ) ;
125+ if ( this . withReplies ) {
126+ // if withReplies is true, we need to reload the replies list
127+ await this . fetchReplies ( { append : ! ( this . page === 1 ) } ) ;
128+ this . page ++ ;
129+ } else {
130+ this . page ++ ;
131+ await this . fetchReplies ( { append : true } ) ;
132+ }
127133 }
128134
129135 override connectedCallback ( ) : void {
Original file line number Diff line number Diff line change 88 label : 基本设置
99 formSchema :
1010 - $formkit : number
11- label : 默认加载评论条数
11+ label : 评论分页条数
1212 name : size
1313 validation : required
1414 value : 20
1515 - $formkit : number
16- label : 默认加载回复条数
16+ label : 回复分页条数
1717 name : replySize
1818 validation : required
1919 value : 10
You can’t perform that action at this time.
0 commit comments