yangchenggong1_wd

fix |> 20793 搜索结果页,聚合的搜索结果,出现在第一条上面不要分割,出现在页面中间上下都要有粗分割线,鸿蒙现状:出现在页面中间,上分割线未加粗

... ... @@ -113,6 +113,8 @@ export class ContentDTO implements BaseDTO {
sameContentListJson:string = ""
sameContentListSize:number = 0
sameContentListId:string = ""
isAggregateData:boolean = false
/*
本地辅助字段
*/
... ...
... ... @@ -16,6 +16,7 @@ const TAG: string = 'More_Comp';
export struct MoreComponent {
@State contentDTO: ContentDTO = new ContentDTO();
@State showDetail: boolean = false;
@Prop nextIsAggregateData: boolean = false;
aboutToAppear(): void {
this.dealSearchSameList()
... ... @@ -24,6 +25,7 @@ export struct MoreComponent {
build() {
if (this.showDetail) {
Column(){
ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
if (item.appStyle !== "9") {
CardParser({compDTO:new CompDTO, contentDTO: item ,isNeedDivider:index === this.contentDTO.sameContentList.length -1 ? false:true})
... ... @@ -43,14 +45,17 @@ export struct MoreComponent {
}
})
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
if(!this.nextIsAggregateData){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
}
} else {
Column(){
Column() {
Row() {
... ... @@ -72,11 +77,12 @@ export struct MoreComponent {
}
.padding({left: 10 + 6 , right: 10 + 6})
}
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
if(!this.nextIsAggregateData){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
}
... ...
... ... @@ -317,21 +317,40 @@ export struct SearchResultContentComponent {
ActivityItemComponent({ contentDTO: item })
.padding({left: 6, right: 6})
} else if (item.sameContentListSize > 0) {
MoreComponent({ contentDTO: item })
MoreComponent({ contentDTO: item ,
nextIsAggregateData:(index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData)})
} else if (item.appStyle == "9") {
Column() {
Card9Component({
compDTO: new CompDTO,
contentDTO: item,
pageId: "",
pageName: ""
})
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
Column(){
if(item.isAggregateData && index != 0){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
Column() {
Card9Component({
compDTO: new CompDTO,
contentDTO: item,
pageId: "",
pageName: ""
})
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
.padding({left: 6, right: 6})
}
.padding({left: 6, right: 6})
} else {
CardParser({ compDTO: new CompDTO, contentDTO: item })
.padding({left: 6, right: 6})
Column(){
if(item.isAggregateData && index != 0){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
CardParser({ compDTO: new CompDTO, contentDTO: item ,isNeedDivider: (index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData) ? false : true})
.padding({left: 6, right: 6})
}
}
}
}
... ... @@ -564,6 +583,7 @@ export struct SearchResultContentComponent {
contentDTO.shareFlag = value.data.shareFlag
contentDTO.contentText = value.data.contentText
contentDTO.author = value.data.author
contentDTO.isAggregateData = (value.data.sameContentList != null && value.data.sameContentList.length > 0)
return contentDTO;
}
... ...