Skip to content

Commit

Permalink
Merge pull request #245 from mgz0227/dev_2008
Browse files Browse the repository at this point in the history
优化书单分享图片保存
  • Loading branch information
MaoXiaoone authored Aug 6, 2024
2 parents e834914 + 211a843 commit b777fc5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"name": "color_black_6",
"value": "rgba(0, 0, 0, 0.06)"
},
{
"name": "color_black_4",
"value": "rgba(0, 0, 0, 0.04)"
},
{
"name": "color_black_0",
"value": "rgba(0, 0, 0, 0)"
Expand Down
26 changes: 19 additions & 7 deletions entry/src/main/ets/pages/view/dialog/shareWorksBook.ets
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default struct shareWorksBook {
.textAlign(TextAlign.Center)
.fontSize(12).fontWeight(400).lineHeight(20).fontColor($r('app.string.color_black_88'))
Column({
space:PaddingConstants.PADDING_8
space:PaddingConstants.PADDING_15
}){
ForEach(this.bookList,(item:Books,index)=>{
this.BookShelfInfo(item,index)
Expand All @@ -87,7 +87,7 @@ export default struct shareWorksBook {
.alignItems(HorizontalAlign.Start)
}
.margin(40)
.padding({top:24,left:20,right:20})
.padding({ top: 24, left: 20, right: 20, bottom: 24 })
.backgroundColor(Color.White)
.zIndex(2)
//用于图片保存不做显示
Expand All @@ -109,22 +109,22 @@ export default struct shareWorksBook {
.fontColor($r('app.string.color_black_88'))

Column({
space:PaddingConstants.PADDING_8
space:PaddingConstants.PADDING_15
}){
ForEach(this.bookList.slice(0, 4),(item:Books,index)=>{
this.BookShelfInfo(item,index)
})
}
}
.alignItems(HorizontalAlign.Start)
.padding({ top: 24, left: 20, right: 20 })
.padding({ top: 24, left: 20, right: 20, bottom: 24 })
.backgroundColor('#FFF7EC')
this.footerSaveImage()
}
.id('shareBook')
.margin(40)
.position({y: 0})
.zIndex(0)
.visibility(Visibility.Hidden)

Column() {
Column() {
Expand Down Expand Up @@ -364,11 +364,23 @@ export default struct shareWorksBook {
}
}

if (this.works.worksBookList){
if (this.works.worksBookList && this.works.worksBookList[index].recommend){
Column(){
Text(this.works.worksBookList[index].recommend ?? '')
.padding(10)
.padding({
top:PaddingConstants.PADDING_8,
bottom:PaddingConstants.PADDING_8,
left:PaddingConstants.PADDING_12,
right:PaddingConstants.PADDING_12
})
}
.borderRadius(8)
.margin({
top:PaddingConstants.PADDING_16
})
.alignItems(HorizontalAlign.Start)
.width('100%')
.backgroundColor($r('app.string.color_black_4'))
}
}
.alignItems(HorizontalAlign.Start)
Expand Down

0 comments on commit b777fc5

Please sign in to comment.