chenjun3_wd

16866 早晚报-背景色未填充到顶部、顶部元素缺失、字体不正确、日期规则不正确、评论数据统计不正确 渐变待完善

... ... @@ -224,7 +224,7 @@ export struct MorningEveningPaperComponent {
// // subtitle: this.morningEveningPaperDTO?.topicInfo?.topicDate ?? ''
// subtitle: this.subTitle
// })
.margin({ left: 14, right: 14 })
// .margin({ left: 14, right: 14 })
}
.width('100%')
// .backgroundColor(Color.Black)
... ...
... ... @@ -26,6 +26,15 @@ export struct PaperTitleComponent {
.id('img_logo1')
Row() {
// 在 29 * 18 的矩形框中绘制一个三角形,起点(0, 0),经过(0, 18),经过(20, 18),终点(29, 0)
Polygon({ width: 29, height: 18 })
.points([[0, 0], [0, 18], [20, 18], [29, 0]])// .fill(Color.White)
.fillOpacity(0.2)
.fill(Color.White)
// .linearGradient({
// direction: GradientDirection.Right,
// colors: [[0xffffff, 1.0], [0xffffff, 0.75], [0xffffff, 0.5], [0xffffff, 0.0], [0xffffff, 0.0]]
// })
Text(this.title ?? "")
.margin({ left: 5 })
.fontSize(20)
... ... @@ -38,7 +47,11 @@ export struct PaperTitleComponent {
.fontSize(8)
.fontColor($r('app.color.white'))
.maxLines(2)
this.rightDecorateBuilder()
// .linearGradient({
// direction: GradientDirection.Right,
// colors: [[0x4Dffffff, 1.0], [0x4Dffffff, 0.75], [0x4Dffffff, 0.5], [0x4Dffffff, 0.75], [0x1ffffff, 0.0]]
// })
Image($r('app.media.bg_event_status_end'))
.height($r('app.float.top_arrow_size'))
.width(100)
... ... @@ -79,9 +92,32 @@ export struct PaperTitleComponent {
ToastUtils.showToast('分享为公共方法,待开发', 1000)
})
}
.margin({ left: 14, right: 14 })
// .margin({ left: 14, right: 14 })
.height($r('app.float.top_bar_height'))
// .backgroundColor(Color.Black)
}
@Builder
leftDecorateBuilder() {
}
@Builder
rightDecorateBuilder() {
Row() {
Polygon({ width: 20, height: 18 })
.points([[8, 0], [0, 18], [20, 18], [20, 0]])// .fill(Color.White)
.fillOpacity(0.3)
.fill(Color.White)
Rect({ width: 80, height: 18 })// .fillOpacity(0.3)
.fill(Color.White)
.fillOpacity(0.01)
.linearGradient({
direction: GradientDirection.Right,
colors: [[0x4Dffffff, 1.0], [0x4Dffffff, 0.75], [0x4Dffffff, 0.5], [0x40ffffff, 0.25], [0x1ffffff, 0.0]]
})
}
.margin({ left: 6 })
}
}
\ No newline at end of file
... ...