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-17 18:39:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
39193675e43497ef75094721073abe9c702cd2ae
39193675
1 parent
5ad981d8
fix: 头图卡问题调整,缺省图颜色
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
52 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
3919367
...
...
@@ -38,9 +38,9 @@ export struct Card11Component {
Column() {
Stack() {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
Notes({ newTags: this.contentDTO.newTags })
.height(27).align(Alignment.Center)
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
Notes({ objectType: this.contentDTO.objectType })
.height(27).align(Alignment.Center)
}
Text() {
if (this.titleMarked) {
...
...
@@ -52,6 +52,7 @@ export struct Card11Component {
Span(this.contentDTO.newsTitle)
}
}
.lineHeight(27)
.fontSize($r("app.float.font_size_18"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.maxLines(3)
...
...
@@ -59,7 +60,7 @@ export struct Card11Component {
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 3
0
: 0)
this.contentDTO.objectType == '5' ? 3
5
: 0)
}.alignContent(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card17Component.ets
View file @
3919367
...
...
@@ -48,12 +48,12 @@ export struct Card17Component {
Span(this.contentDTO.newsTitle)
}
}
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.font_size_18'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.font_size_17'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
Stack({ alignContent: Alignment.BottomEnd }) {
// 三个图,
...
...
@@ -120,7 +120,7 @@ export struct Card17Component {
})
// 评论等信息
CardSourceInfo({
compDTO:
this.compDTO, contentDTO: this.contentDTO })
CardSourceInfo({
compDTO:
this.compDTO, contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.padding({
...
...
@@ -131,11 +131,3 @@ export struct Card17Component {
})
}
}
// 全局公共样式
@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/cardview/Card3Component.ets
View file @
3919367
...
...
@@ -36,9 +36,9 @@ export struct Card3Component {
Column() {
Stack() {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
Notes({ newTags: this.contentDTO.newTags })
.height(27).align(Alignment.Center)
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
Notes({ objectType: this.contentDTO.objectType })
.height(27).align(Alignment.Center)
}
Text() {
if (this.titleMarked) {
...
...
@@ -56,11 +56,11 @@ export struct Card3Component {
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 3
0
: 0)
this.contentDTO.objectType == '5' ? 3
5
: 0)
}.alignContent(Alignment.TopStart)
// 评论等信息
CardSourceInfo({
compDTO:
this.compDTO, contentDTO: this.contentDTO })
CardSourceInfo({
compDTO:
this.compDTO, contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.padding({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
3919367
...
...
@@ -72,13 +72,12 @@ export struct Card5Component {
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.font_size_18'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.TopStart)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 3
0
: 0)
this.contentDTO.objectType == '5' ? 3
5
: 0)
}.alignContent(Alignment.TopStart)
}
.justifyContent(FlexAlign.Start)
...
...
@@ -88,12 +87,12 @@ export struct Card5Component {
}
.alignContent(Alignment.Bottom)
.width(CommonConstants.FULL_WIDTH)
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
// .padding({
// left: $r('app.float.card_comp_pagePadding_lf'),
// right: $r('app.float.card_comp_pagePadding_lf'),
// top: $r('app.float.card_comp_pagePadding_tb'),
// bottom: $r('app.float.card_comp_pagePadding_tb')
// })
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
3919367
...
...
@@ -69,16 +69,16 @@ export struct Card6Component {
Span(this.contentDTO.newsTitle)
}
}
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
}
...
...
@@ -86,7 +86,7 @@ export struct Card6Component {
//bottom 评论等信息
CardSourceInfo({ compDTO: this.compDTO,
contentDTO:
this.contentDTO })
CardSourceInfo({ compDTO: this.compDTO,
contentDTO:
this.contentDTO })
}
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
3919367
...
...
@@ -38,11 +38,6 @@ export struct Card9Component {
Column() {
// 顶部标题,最多两行
if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text() {
if (this.titleMarked) {
Span(this.str01)
...
...
@@ -56,14 +51,9 @@ export struct Card9Component {
.fontColor(this.clicked ? 0x848484 : 0x222222)
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_18'))
.fontWeight(600)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 19 })
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
.margin({ top: 10, bottom: 10 })
}
// 大图
Stack() {
...
...
Please
register
or
login
to post a comment