xugenyuan

ref |> 热门评论-查看更多回复,与评论信息间距过大

http://192.168.1.3:8080/zentao/bug-view-20065.html

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -578,48 +578,53 @@ struct footerExpandedView { @@ -578,48 +578,53 @@ struct footerExpandedView {
578 578
579 build() { 579 build() {
580 Row() { 580 Row() {
581 - if (this.item.expanded) {  
582 - Row() {  
583 - Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1)  
584 - if (this.item.childsHasMore) { 581 + Row() {
  582 + if (this.item.expanded) {
  583 + Row() {
  584 + Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1)
  585 + if (this.item.childsHasMore) {
  586 + Row() {
  587 + Text('查看更多回复').fontColor($r('app.color.color_222222')).fontSize(14)
  588 + Image($r('app.media.comment_unfold')).width(12).height(12)
  589 + }.margin({ left: 6 })
  590 + .onClick(() => {
  591 + if (this.item.isLoading) {
  592 + return
  593 + }
  594 + this.item.isLoading = true
  595 + fetchChildContentCommentList(this.contentId, this.contentType, this.item)
  596 + })
  597 + }
585 Row() { 598 Row() {
586 - Text('查看更多回复').fontColor($r('app.color.color_222222')).fontSize(14)  
587 - Image($r('app.media.comment_unfold')).width(12).height(12) 599 + Text('收起').fontColor($r('app.color.color_222222')).fontSize(14)
  600 + Image($r('app.media.comment_pickUp')).width(12).height(12)
588 }.margin({ left: 6 }) 601 }.margin({ left: 6 })
589 .onClick(() => { 602 .onClick(() => {
590 - if (this.item.isLoading) {  
591 - return  
592 - }  
593 - this.item.isLoading = true  
594 - fetchChildContentCommentList(this.contentId, this.contentType, this.item) 603 + this.item.pageNum = 1
  604 + this.item.expanded = false
  605 + this.item.childComments = []
  606 + this.item.childCommentsLazyDataSource.clear()
595 }) 607 })
596 - } 608 + }.margin({ left: 53 })
  609 + } else {
597 Row() { 610 Row() {
598 - Text('收起').fontColor($r('app.color.color_222222')).fontSize(14)  
599 - Image($r('app.media.comment_pickUp')).width(12).height(12)  
600 - }.margin({ left: 6 }) 611 + Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1)
  612 + Text('查看更多回复').fontColor($r('app.color.color_222222')).fontSize(14).margin({ left: 6 })
  613 + Image($r('app.media.comment_unfold')).width(12).height(12)
  614 + }.margin({ left: 53 })
601 .onClick(() => { 615 .onClick(() => {
602 - this.item.pageNum = 1  
603 - this.item.expanded = false  
604 - this.item.childComments = []  
605 - this.item.childCommentsLazyDataSource.clear() 616 + if (this.item.isLoading) {
  617 + return
  618 + }
  619 + this.item.isLoading = true
  620 + fetchChildContentCommentList(this.contentId, this.contentType, this.item)
606 }) 621 })
607 - }.margin({ left: 53 })  
608 - } else {  
609 - Row() {  
610 - Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1)  
611 - Text('查看更多回复').fontColor($r('app.color.color_222222')).fontSize(14).margin({ left: 6 })  
612 - Image($r('app.media.comment_unfold')).width(12).height(12)  
613 - }.margin({ left: 53 })  
614 - .onClick(() => {  
615 - if (this.item.isLoading) {  
616 - return  
617 - }  
618 - this.item.isLoading = true  
619 - fetchChildContentCommentList(this.contentId, this.contentType, this.item)  
620 - })  
621 - }  
622 - }.height(30) 622 + }
  623 + }.height(20)
  624 + // .backgroundColor(Color.Green)
  625 + }.height(24)
  626 + .alignItems(VerticalAlign.Top)
  627 + // .backgroundColor(Color.Gray)
623 } 628 }
624 } 629 }
625 630