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-08-22 15:05:25 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
b28d180e6efd096d913aedaf45e80ce902539343
b28d180e
2 parents
df1aca65
c2de3a01
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
b28d180
...
...
@@ -91,7 +91,8 @@ export struct ZhCarouselLayout01 {
ForEach(this.compDTO?.operDataList, (item: ContentDTO, index: number) => {
CarouselLayout01CardView({
item: item,
length: this.compDTO.operDataList.length
length: this.compDTO.operDataList.length,
showPicBorderRadius: this.compDTO.operDataList.length == 1
})
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
...
...
@@ -188,6 +189,7 @@ struct CarouselLayout01CardView {
@State loadImg: boolean = false;
private item: ContentDTO = new ContentDTO();
private length: number = 1; // 轮播图数量
private showPicBorderRadius: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -200,6 +202,7 @@ struct CarouselLayout01CardView {
.height(CommonConstants.FULL_PARENT)
.objectFit(ImageFit.Cover)
.backgroundColor(0xf5f5f5)
.borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0)
Row()
.width(CommonConstants.FULL_PARENT)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
View file @
b28d180
...
...
@@ -132,7 +132,7 @@ export struct ZhSingleColumn09 {
.width('100%')
Grid() {
ForEach(this.operDataList, (item: ContentDTO, index: number) => {
ForEach(this.operDataList
.slice(0, 8)
, (item: ContentDTO, index: number) => {
GridItem() {
Stack({ alignContent: Alignment.TopEnd }) {
Image(this.loadImg ? item.coverUrl : '')
...
...
@@ -161,7 +161,7 @@ export struct ZhSingleColumn09 {
.objectFit(ImageFit.Contain)
}
.width('100%')
.
height('100%'
)
.
aspectRatio(2 / 1
)
}
.margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 })
.onClick(() => {
...
...
@@ -174,9 +174,7 @@ export struct ZhSingleColumn09 {
})
})
}
.height(90)
.columnsTemplate('1fr 1fr 1fr 1fr')
.rowsTemplate('1fr 1fr')
.margin({ bottom: 5 })
Row() {
...
...
@@ -192,11 +190,14 @@ export struct ZhSingleColumn09 {
.onClick(() => {
if (this.currentOperDataListIndex > 0) {
this.currentOperDataListIndex--
} else {
return
}
if (this.compDTO?.operDataList.length > 8) {
if (this.pageModel) {
this.pageModel.compList.deleteItem(this.compIndex)
}
this.operDataList = this.shuffleArray(this.operDataList)
// if (this.pageModel) {
// this.pageModel.compList.deleteItem(this.compIndex)
// }
this.activeIndexs = [];
}
})
...
...
Please
register
or
login
to post a comment