Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yangchenggong1_wd
2024-10-15 13:32:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
66c89141d15b51fe8a7617557364ec9ff90682b2
66c89141
1 parent
32d9d0f1
fix |> 20793 搜索结果页,聚合的搜索结果,出现在第一条上面不要分割,出现在页面中间上下都要有粗分割线,鸿蒙现状:出现在页面中间,上分割线未加粗
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
21 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
66c8914
...
...
@@ -113,6 +113,8 @@ export class ContentDTO implements BaseDTO {
sameContentListJson:string = ""
sameContentListSize:number = 0
sameContentListId:string = ""
isAggregateData:boolean = false
/*
本地辅助字段
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
View file @
66c8914
...
...
@@ -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)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
66c8914
...
...
@@ -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;
}
...
...
Please
register
or
login
to post a comment