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-14 11:35:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
855430880fb3f7ec1cda999490cbde019529bdad
85543088
1 parent
f18c031d
fix |> 20784 搜索结果,粗分割线应通道左右两侧,不应留间距,见截图。
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
40 deletions
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/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
View file @
8554308
...
...
@@ -23,51 +23,60 @@ export struct MoreComponent {
build() {
if (this.showDetail) {
ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
if (item.appStyle !== "9") {
CardParser({compDTO:new CompDTO, contentDTO: item })
.padding({left: 10, right: 10})
} else {
Column(){
Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" })
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(4)
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})
.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: 6, right: 6})
}
.padding({left: 10, right: 10})
}
})
} else {
Column() {
Row() {
Text('点击展开更多相似')
.fontSize(16)
Text(`(${this.contentDTO.sameContentListSize})`)
.fontSize(16)
Image($r('app.media.comment_unfold'))
.width(16)
.height(16)
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height(48)
.backgroundColor(0xffffff)
.onClick(() => {
this.showDetail = true;
})
Divider()
.width('100%')
.width('100%'
)
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
} else {
Column(){
Column() {
Row() {
Text('点击展开更多相似')
.fontSize(16)
Text(`(${this.contentDTO.sameContentListSize})`)
.fontSize(16)
Image($r('app.media.comment_unfold'))
.width(16)
.height(16)
}
.justifyContent(FlexAlign.Center)
.width('100%')
.height(48)
.backgroundColor(0xffffff)
.onClick(() => {
this.showDetail = true;
})
}
.padding({left: 10 + 6 , right: 10 + 6})
}
.padding({left: 10, right: 10})
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
...
...
@@ -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 = {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
8554308
...
...
@@ -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
...
...
Please
register
or
login
to post a comment