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-21 13:13:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
76f5602ef1deea4011b0bd829b50d7f3653e9e46
76f5602e
1 parent
86ff79c6
fix: 18091 健康频道>轮播图卡配置为投票活动交互问题
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 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 @
76f5602
...
...
@@ -65,7 +65,7 @@ export struct ZhCarouselLayout01 {
Logger.info(TAG,
`aboutToAppear, beanList:${this.compDTO?.operDataList?.length}, currentBreakpoint:${this.currentBreakpoint}`);
let list: number[] = []
for (let i = 1; i <= this.
compDTO?.operDataList
?.length; i++) {
for (let i = 1; i <= this.
filterAtv()
?.length; i++) {
list.push(i);
}
this.data = new MyDataSource(list)
...
...
@@ -84,17 +84,23 @@ export struct ZhCarouselLayout01 {
}
}
filterAtv() {
return this.compDTO.operDataList.filter(((item: ContentDTO) => {
return !item.linkUrl.includes('/h/atv')
}))
}
build() {
if (this.compDTO?.operDataList?.length) {
if (this.compDTO?.operDataList.length > 1) {
Stack() {
Swiper() {
ForEach(this.
compDTO?.operDataList
, (item: ContentDTO, index: number) => {
ForEach(this.
filterAtv()
, (item: ContentDTO, index: number) => {
CarouselLayout01CardView({
item: item,
length: this.compDTO.operDataList.length,
showPicBorderRadius: this.compDTO.operDataList.length == 1
length: this.filterAtv().length,
showPicBorderRadius: this.filterAtv().length == 1
})
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
...
...
@@ -172,13 +178,13 @@ export struct ZhCarouselLayout01 {
.width(CommonConstants.FULL_WIDTH)
} else {
CarouselLayout01CardView({
item: this.
compDTO.operDataList
[0],
item: this.
filterAtv()
[0],
length: 1,
showPicBorderRadius: this.
compDTO.operDataList
.length == 1
showPicBorderRadius: this.
filterAtv()
.length == 1
})
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
ProcessUtils.processPage(this.compDTO.operDataList[0])
InfomationCardClick.track(this.compDTO, this.filterAtv()[0], this.pageId, this.pageName)
ProcessUtils.processPage(this.filterAtv()[0])
})
.padding({
left: 10,
...
...
Please
register
or
login
to post a comment