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
douaojie
2024-05-15 15:04:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3c1c78e76560787f8a9385c818e9baf189e02659
3c1c78e7
1 parent
07000124
fix: 问题修复
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
View file @
3c1c78e
...
...
@@ -40,7 +40,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.
aspectRatio(16 /
9)
.
height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_
9)
.borderRadius({
topLeft: $r('app.float.image_border_radius'),
bottomLeft: $r('app.float.image_border_radius'),
...
...
@@ -52,7 +52,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.
aspectRatio(16 /
9)
.
height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_
9)
.margin({ bottom: 1 })
.borderRadius({
topRight: $r('app.float.image_border_radius'),
...
...
@@ -69,7 +69,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.
aspectRatio(16 /
9)
.
height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_
9)
.margin({ top: 1 })
.borderRadius({
bottomRight: $r('app.float.image_border_radius'),
...
...
@@ -107,4 +107,12 @@ export struct Card17Component {
bottom: $r('app.float.card_comp_pagePadding_tb')
})
}
}
// 全局公共样式
@Styles
function ImageSize() {
.padding({ right: 18, left: 18 })
.width('100%')
.margin({ top: 10 })
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02.ets
View file @
3c1c78e
...
...
@@ -20,6 +20,8 @@ export struct ZhGridLayout02 {
@State compDTO: CompDTO = {} as CompDTO
@State operDataList: ContentDTO[] = []
@State loadImg: boolean = false;
currentPage = 1
pageSize = 12
async aboutToAppear(): Promise<void> {
Logger.debug(TAG, 'aboutToAppear ' + this.compDTO.objectTitle)
...
...
@@ -32,9 +34,6 @@ export struct ZhGridLayout02 {
this.loadImg = await onlyWifiLoadImg();
}
currentPage = 1
pageSize = 12
build() {
Column() {
Scroll() {
...
...
@@ -50,7 +49,7 @@ export struct ZhGridLayout02 {
.fontWeight(600)
}
.justifyContent(FlexAlign.Start)
.margin({ top:
8
, bottom: 8 })
.margin({ top:
16
, bottom: 8 })
.width(CommonConstants.FULL_WIDTH)
GridRow({
...
...
@@ -106,7 +105,7 @@ export struct ZhGridLayout02 {
.height(95)
.borderRadius(4)
Text(item.newsTitle)
.margin({
top:'5'
})
.margin({
top: '5'
})
.fontSize(13)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
Please
register
or
login
to post a comment