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-09-06 17:02:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b91ab6c7325ccb33c3bbf8b33fba1acc471a80ce
b91ab6c7
1 parent
7172ef93
fix: 轮播图只有一条数据时折叠屏展开适配
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
b91ab6c
...
...
@@ -87,6 +87,7 @@ export struct ZhCarouselLayout01 {
build() {
if (this.compDTO?.operDataList?.length) {
if (this.compDTO?.operDataList.length > 1) {
Stack() {
Swiper() {
ForEach(this.compDTO?.operDataList, (item: ContentDTO, index: number) => {
...
...
@@ -170,6 +171,26 @@ export struct ZhCarouselLayout01 {
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
} else {
CarouselLayout01CardView({
item: this.compDTO.operDataList[0],
length: 1,
showPicBorderRadius: this.compDTO.operDataList.length == 1
})
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
ProcessUtils.processPage(this.compDTO.operDataList[0])
})
.padding({
left: 10,
right: 10,
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
.borderRadius($r('app.float.image_border_radius'))
}
} else {
EmptyComponent({ emptyHeight: 200 })
}
}
...
...
Please
register
or
login
to post a comment