yangchenggong1_wd

fix |> 20784 搜索结果,粗分割线应通道左右两侧,不应留间距,见截图。

... ... @@ -23,25 +23,34 @@ 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 })
.padding({left: 10, right: 10})
CardParser({compDTO:new CompDTO, contentDTO: item ,isNeedDivider:index === this.contentDTO.sameContentList.length -1 ? false:true})
.padding({left: 6, right: 6})
} else {
Column(){
Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" })
if(index != this.contentDTO.sameContentList.length -1){
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(4)
}
.padding({left: 10, right: 10})
}
.padding({left: 6, right: 6})
}
})
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
} else {
Column(){
Column() {
Row() {
... ... @@ -60,14 +69,14 @@ export struct MoreComponent {
.onClick(() => {
this.showDetail = true;
})
}
.padding({left: 10 + 6 , right: 10 + 6})
}
Divider()
.width('100%')
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
.padding({left: 10, right: 10})
}
... ... @@ -75,6 +84,11 @@ export struct MoreComponent {
}
dealSearchSameList() {
//来回返回,会重新触发 dealSearchSameList,如果已经获取过 sameList 不再重新获取
if(this.contentDTO.sameContentList.length > 0){
return
}
let resultData : SearchDescription[] = JSON.parse(this.contentDTO.sameContentListJson) as SearchDescription[]
let data: contentListParams = {
... ...
... ... @@ -283,13 +283,13 @@ export struct SearchResultContentComponent {
if (this.data_rmh.length === 1) {
ListItem() {
FollowChildComponent({ data: this.bean, type: 1 ,searchText: decodeURI(this.keywords)})
}.padding({ left: 10, right: 10 })
}.padding({ left: 10 + 6 , right: 10 + 6})
} else {
ListItem() {
Column() {
this.SearchListUI()
}
}
}.padding({left: 6, right: 6})
}
}
LazyForEach(this.data, (item: ContentDTO, index: number) => {
... ... @@ -297,6 +297,7 @@ export struct SearchResultContentComponent {
Column() {
if (this.searchType == "activity") {
ActivityItemComponent({ contentDTO: item })
.padding({left: 6, right: 6})
} else if (item.sameContentListSize > 0) {
MoreComponent({ contentDTO: item })
} else if (item.appStyle == "9") {
... ... @@ -309,8 +310,10 @@ export struct SearchResultContentComponent {
})
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
.padding({left: 6, right: 6})
} else {
CardParser({ compDTO: new CompDTO, contentDTO: item })
.padding({left: 6, right: 6})
}
}
}
... ... @@ -321,6 +324,7 @@ export struct SearchResultContentComponent {
ListItem() {
ListHasNoMoreDataUI()
}
.padding({left: 6, right: 6})
}
}
.cachedCount(5)
... ... @@ -338,7 +342,7 @@ export struct SearchResultContentComponent {
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
.padding({left: 6, right: 6})
}
@Builder
... ...