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
陈剑华
2024-05-27 17:01:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e86413f2cfdc07781a78fce05892ac62ac7a78bc
e86413f2
1 parent
00a66aee
feat: 17158 搜索结果页-点击展开更多相似功能缺失
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
View file @
e86413f
/**
* More_Comp
*/
import { ContentDTO , contentListParams, FullColumnImgUrlDTO,
import { ContentDTO , contentListParams, FullColumnImgUrlDTO,
CompDTO
} from 'wdBean/Index';
import MinePageDatasModel from '../../model/MinePageDatasModel';
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel';
import { SearchDescription } from '../../viewmodel/SearchResultContentItem';
import { CardParser } from '../CardParser'
const TAG: string = 'More_Comp';
...
...
@@ -13,12 +14,26 @@ const TAG: string = 'More_Comp';
@Component
export struct MoreComponent {
@State contentDTO: ContentDTO = new ContentDTO();
@State showDetail: boolean = false;
aboutToAppear(): void {
this.dealSearchSameList()
}
build() {
if (this.showDetail) {
ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
CardParser({compDTO:new CompDTO, contentDTO: item })
})
} else {
Column() {
Divider()
.width('100%')
.height(10)
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
Row() {
Text('点击展开更多相似')
.fontSize(16)
...
...
@@ -27,12 +42,26 @@ export struct MoreComponent {
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%')
.height(10)
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}
}
}
dealSearchSameList() {
...
...
@@ -88,6 +117,8 @@ export struct MoreComponent {
console.log("ycg","123")
}
})
console.log("MoreComponent", JSON.stringify(this.contentDTO.sameContentList))
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
...
...
Please
register
or
login
to post a comment