陈剑华

fix: 轮播图只有一条数据时折叠屏展开适配

@@ -87,6 +87,7 @@ export struct ZhCarouselLayout01 { @@ -87,6 +87,7 @@ export struct ZhCarouselLayout01 {
87 build() { 87 build() {
88 88
89 if (this.compDTO?.operDataList?.length) { 89 if (this.compDTO?.operDataList?.length) {
  90 + if (this.compDTO?.operDataList.length > 1) {
90 Stack() { 91 Stack() {
91 Swiper() { 92 Swiper() {
92 ForEach(this.compDTO?.operDataList, (item: ContentDTO, index: number) => { 93 ForEach(this.compDTO?.operDataList, (item: ContentDTO, index: number) => {
@@ -170,6 +171,26 @@ export struct ZhCarouselLayout01 { @@ -170,6 +171,26 @@ export struct ZhCarouselLayout01 {
170 .backgroundColor(0xffffff) 171 .backgroundColor(0xffffff)
171 .width(CommonConstants.FULL_WIDTH) 172 .width(CommonConstants.FULL_WIDTH)
172 } else { 173 } else {
  174 + CarouselLayout01CardView({
  175 + item: this.compDTO.operDataList[0],
  176 + length: 1,
  177 + showPicBorderRadius: this.compDTO.operDataList.length == 1
  178 + })
  179 + .onClick((event: ClickEvent) => {
  180 + InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
  181 + ProcessUtils.processPage(this.compDTO.operDataList[0])
  182 + })
  183 + .padding({
  184 + left: 10,
  185 + right: 10,
  186 + top: $r('app.float.card_comp_pagePadding_tb'),
  187 + bottom: $r('app.float.card_comp_pagePadding_tb')
  188 + })
  189 + .backgroundColor(0xffffff)
  190 + .width(CommonConstants.FULL_WIDTH)
  191 + .borderRadius($r('app.float.image_border_radius'))
  192 + }
  193 + } else {
173 EmptyComponent({ emptyHeight: 200 }) 194 EmptyComponent({ emptyHeight: 200 })
174 } 195 }
175 } 196 }