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
yanlu
2024-05-10 10:29:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
690d75ffa5ab329406082cf1167f0cdbbdc93180
690d75ff
1 parent
4658a0d7
fix:16991 早晚报列表页-元素展示问题
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
26 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
View file @
690d75f
...
...
@@ -27,35 +27,51 @@ export struct PaperTitleComponent {
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)
// 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]]
// })
Row()
.width('29vp')
.height('18vp')
.clip(new Path({
commands: `M0 0 H${vp2px(29)} L${vp2px(20)} ${vp2px(18)} L0 ${vp2px(18)} Z`
}))
.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: false, // 渐变颜色是否重复
colors: [[0x1affffff, 0.0],[0x1affffff, 0.3], [0x33ffffff, 0.6], [0x4dffffff,1]] // 数组末尾元素占比小于1时满足重复着色效果
})
Text(this.title ?? "")
.margin({ left: 5 })
.fontSize(20)
.margin({ left: 10 })
.fontSize(22)
.fontColor($r('app.color.white'))
.fontWeight(900)
.maxLines(1)
Text(this.subTitle ?? '')// Text('2024年\n1月16日')
// .width(50)
.margin({ left: 5 })
.fontSize(8)
.margin({ left: 6 })
.fontSize(10)
.fontColor($r('app.color.white'))
.maxLines(2)
.textAlign(TextAlign.End)
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)
.visibility(Visibility.None)
// Image($r('app.media.bg_event_status_end'))
// .height($r('app.float.top_arrow_size'))
// .width(100)
// .visibility(Visibility.None)
}
.height('100%')
.alignItems(VerticalAlign.Center)
...
...
@@ -87,7 +103,7 @@ export struct PaperTitleComponent {
center: { anchor: "__container__", align: VerticalAlign.Center }
})
.id('img_share')
.margin({ right: 1
3
})
.margin({ right: 1
6
})
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000)
})
...
...
@@ -105,19 +121,32 @@ export struct PaperTitleComponent {
@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)
Row()
.width('100vp')
.height('18vp')
.clip(new Path({
commands: `M${vp2px(9)} 0 H${vp2px(91)} V${vp2px(18)} L0 ${vp2px(18)} Z`
}))
.linearGradient({
direction: GradientDirection.Right,
colors: [[0x4Dffffff, 1.0], [0x4Dffffff, 0.75], [0x4Dffffff, 0.5], [0x40ffffff, 0.25], [0x1ffffff, 0.0]]
direction: GradientDirection.Right, // 渐变方向
repeating: false, // 渐变颜色是否重复
colors: [[0x4dffffff, 0.0], [0x33ffffff, 0.3], [0x1affffff,0.6], [0x03ffffff,1]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
.margin({ left: 6 })
.margin({ left:8, right: 0})
// 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
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
690d75f
...
...
@@ -517,7 +517,7 @@ export struct PaperSingleColumn999CardView {
}
}
.backgroundColor(Color.White)
.margin({ bottom:
5
, left: 12, right: 12 })
.margin({ bottom:
14
, left: 12, right: 12 })
.borderRadius(4)
.onClick(() => {
ProcessUtils.processPage(this.item)
...
...
Please
register
or
login
to post a comment